WEST batch #528
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: test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "python-package-${{ github.ref }}" | |
| cancel-in-progress: true | |
| env: | |
| BASE_PYTHON_VERSION: "3.12" | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/install-project | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Ruff format check | |
| run: uv run ruff format --check . | |
| - name: Ruff lint check | |
| run: uv run ruff check . | |
| - name: Grammar codegen drift check | |
| run: uv run build-grammar --check | |
| - name: Test | |
| run: uv run pytest | |
| # Instrumented run: branch coverage costs more wall clock than the suite it | |
| # measures, so it reports rather than gates. A failure here never fails the | |
| # workflow, and this job is deliberately absent from the required checks. | |
| coverage: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/install-project | |
| with: | |
| python-version: ${{ env.BASE_PYTHON_VERSION }} | |
| - name: Test with branch coverage | |
| run: | | |
| uv run pytest \ | |
| --cov \ | |
| --cov-branch \ | |
| --cov-report=xml \ | |
| --junitxml=junit.xml -o junit_family=legacy | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| - name: Upload coverage reports to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 |