Repository navigation
chore: mirror js tests and implementation #4879
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release-* | |
| pull_request: | |
| branches: | |
| - main | |
| - release-* | |
| concurrency: | |
| # For pull requests, cancel all currently-running jobs for this workflow | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| infra: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.10" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r local-requirements.txt | |
| pip install -r requirements.txt | |
| pip install -e . | |
| - name: Lint | |
| run: pre-commit run --show-diff-on-failure --color=always --all-files | |
| - name: Check the tests against the upstream test registry | |
| run: python scripts/check_test_registry.py --report | |
| build: | |
| name: Build | |
| timeout-minutes: 120 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest, macos-15-xlarge] | |
| python-version: ['3.12'] | |
| browser: [chromium, firefox, webkit] | |
| exclude: | |
| # WebKit on standard macOS-latest (currently macos-15-arm64) is unstable; | |
| # upstream pins paid macos-15-xlarge for cross-browser webkit too. | |
| - os: macos-latest | |
| browser: webkit | |
| include: | |
| - os: ubuntu-latest | |
| python-version: '3.10' | |
| browser: chromium | |
| - os: ubuntu-latest | |
| python-version: '3.11' | |
| browser: chromium | |
| - os: ubuntu-latest | |
| python-version: '3.13' | |
| browser: chromium | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies & browsers | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r local-requirements.txt | |
| pip install -r requirements.txt | |
| pip install -e . | |
| python -m build --wheel | |
| python -m playwright install --with-deps ${{ matrix.browser }} | |
| - name: Common Tests | |
| run: pytest tests/common --browser=${{ matrix.browser }} --timeout 90 | |
| - name: Test Reference count | |
| run: pytest tests/test_reference_count_async.py --browser=${{ matrix.browser }} | |
| - name: Test Wheel Installation | |
| run: pytest tests/test_installation.py --browser=${{ matrix.browser }} | |
| - name: Test Sync API | |
| if: matrix.os != 'ubuntu-latest' | |
| run: pytest tests/sync --browser=${{ matrix.browser }} --timeout 90 --timeout-method thread -n auto | |
| - name: Test Sync API | |
| if: matrix.os == 'ubuntu-latest' | |
| run: xvfb-run pytest tests/sync --browser=${{ matrix.browser }} --timeout 90 --timeout-method thread -n auto | |
| - name: Test Async API | |
| # Run it after a failure of the sync tests too, to see the failures of both. | |
| if: ${{ !cancelled() && matrix.os != 'ubuntu-latest' }} | |
| run: pytest tests/async --browser=${{ matrix.browser }} --timeout 90 --timeout-method thread -n auto | |
| - name: Test Async API | |
| # Run it after a failure of the sync tests too, to see the failures of both. | |
| if: ${{ !cancelled() && matrix.os == 'ubuntu-latest' }} | |
| run: xvfb-run pytest tests/async --browser=${{ matrix.browser }} --timeout 90 --timeout-method thread -n auto | |
| test_examples: | |
| name: Examples | |
| runs-on: ubuntu-22.04 | |
| defaults: | |
| run: | |
| working-directory: examples/todomvc/ | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies & browsers | |
| run: | | |
| pip install -r requirements.txt | |
| python -m playwright install --with-deps chromium | |
| - name: Common Tests | |
| run: pytest |