Merge branch 'main' into dependabot/github_actions/trufflesecurity/tr… #34
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
| # Quality gate for branch pushes (excluding main). | |
| # Purpose: keep fast feedback for formatting/lint/type checks and run tests across | |
| # supported Python versions. | |
| name: QA | |
| on: | |
| # Run on every non-main branch push. | |
| push: | |
| branches-ignore: [main] | |
| permissions: | |
| # Workflow only needs read access to repository contents. | |
| contents: read | |
| env: | |
| # Baseline interpreter for non-matrix checks. | |
| PYTHON_VERSION: "3.11" | |
| # Keep Poetry virtual environments inside the workspace for deterministic paths. | |
| POETRY_VIRTUALENVS_IN_PROJECT: "true" | |
| jobs: | |
| quality: | |
| # Fast quality checks run once on the baseline Python version. | |
| name: Format Lint Typecheck | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| cache: poetry | |
| cache-dependency-path: poetry.lock | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --no-ansi | |
| - name: Format check | |
| run: make format-check | |
| - name: Lint | |
| run: make lint | |
| - name: Typecheck | |
| run: make typecheck | |
| test-matrix: | |
| # Cross-version test coverage for all supported Python runtimes. | |
| name: Tests (py${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Setup Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: poetry | |
| cache-dependency-path: poetry.lock | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --no-ansi | |
| - name: Test | |
| run: make test |