Skip to content

Update playwright-tests.yaml to pass for workflow1 only #13

Update playwright-tests.yaml to pass for workflow1 only

Update playwright-tests.yaml to pass for workflow1 only #13

# 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