-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (71 loc) · 2.33 KB
/
playwright-tests.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# CI configuration for Playwright with Python and Qualibrate setup
name: Playwright Tests
on:
push:
branches:
- main
- integration
pull_request:
branches:
- main
- integration
jobs:
test:
runs-on: ubuntu-latest
steps:
# Checkout the main repository (qualibrate-app)
- name: Checkout repository
uses: actions/checkout@v4
# Checkout the private calibration scripts repository
- name: Checkout Calibration Scripts
uses: actions/checkout@v4
with:
repository: 'qua-platform/qualibrate-examples' # Private repo
path: 'qualibrate-examples'
token: ${{ secrets.QUALIBRATION_EXAMPLES_TOKEN }}
# Install Python and create virtual environment
- name: Install Python and Create Environment
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install qualibrate
pip install quam
# Install dependencies required for calibration scripts
- name: Install Calibration Dependencies
run: |
source .venv/bin/activate
pip install xarray
pip install -r qualibrate-examples/requirements.txt || true # Install additional dependencies if they exist
# Copy calibration scripts to the default Qualibrate calibration folder
- name: Copy Calibration Scripts
run: |
mkdir -p ~/.qualibrate/calibrations
cp -r qualibrate-examples/calibrations/* ~/.qualibrate/calibrations/
# Create Qualibrate configuration
- name: Create Qualibrate Configuration
run: |
source .venv/bin/activate
qualibrate config --auto-accept
# Install Node.js
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Playwright Dependencies
working-directory: ./frontend/tests
run: |
npm install
npx playwright install --with-deps
# Run Playwright Tests (Workflow 1)
- name: Run Playwright Tests (Workflow 1)
working-directory: ./frontend/tests/e2e
run: |
. ../../../.venv/bin/activate
qualibrate start &
sleep 5 # Wait for the server to start
npx playwright test e2e/workflow1.test.ts