ci(e2e): remove deprecated Playwright action use and install Chromium… #10
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tests | |
| on: | |
| push: | |
| branches: [ main, develop, release/** ] | |
| pull_request: | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| tier: [ unit, integration, e2e ] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e .[dev] | |
| - name: Install Playwright browsers (repo-local, no root) | |
| if: matrix.tier == 'e2e' | |
| env: | |
| PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/dev/test-runs/pw-browsers | |
| TMPDIR: ${{ github.workspace }}/dev/test-runs/tmp | |
| run: | | |
| python -m playwright install chromium | |
| - name: Prepare repo-local temp directories | |
| run: | | |
| mkdir -p dev/test-runs/{tmp,pytest-tmp,artifacts,downloads,pw-browsers} | |
| - name: Run tests by tier | |
| env: | |
| SCIDK_E2E: ${{ matrix.tier == 'e2e' && '1' || '0' }} | |
| TMPDIR: ${{ github.workspace }}/dev/test-runs/tmp | |
| PYTEST_ADDOPTS: --basetemp=${{ github.workspace }}/dev/test-runs/pytest-tmp | |
| PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/dev/test-runs/pw-browsers | |
| run: | | |
| case "${{ matrix.tier }}" in | |
| unit) | |
| pytest -m "not integration and not e2e" -q | |
| ;; | |
| integration) | |
| pytest -m integration -q | |
| ;; | |
| e2e) | |
| pytest -m e2e tests/e2e -v --maxfail=1 --suppress-no-test-exit-code | |
| ;; | |
| esac | |
| - name: Upload Playwright report (on failure) | |
| if: failure() && matrix.tier == 'e2e' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report | |
| path: | | |
| playwright-report/ | |
| test-results/ | |
| dev/test-runs/artifacts/ | |
| dev/test-runs/pytest-tmp/ | |
| if-no-files-found: ignore |