chore: bump griffe from 2.1.0 to 2.2.0 #392
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] | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| # Least-privilege default for every job; nothing here writes to the repository — | |
| # the coverage comment and badge come from Codecov, not from a job. | |
| permissions: | |
| contents: read | |
| jobs: | |
| quality: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # 3.14t is the free-threaded build. The breaker's thread-safety claim | |
| # rests on one threading.Lock; without a GIL-free interpreter nothing in | |
| # CI can falsify it (#102). | |
| python-version: ['3.11', '3.12', '3.13', '3.14', '3.14t'] | |
| env: | |
| UV_PYTHON: ${{ matrix.python-version }} | |
| INTERLOCK_TEST_REDIS_URL: redis://localhost:6379/0 | |
| services: | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| # The token buys the online audits, which are the ones that make a SHA pin | |
| # mean anything: impostor-commit, ref-confusion, known-vulnerable-actions | |
| # and stale-action-refs all read the GitHub API. Without one zizmor warns | |
| # and degrades to the offline subset — which is what a local run does. | |
| - name: Zizmor | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: uv run zizmor .github/workflows/ | |
| - name: Ruff format | |
| run: uv run ruff format --check | |
| - name: Ruff lint | |
| run: uv run ruff check | |
| - name: Mypy | |
| run: uv run mypy --num-workers 2 | |
| - name: Pyright | |
| run: uv run pyright | |
| - name: Pyrefly | |
| run: uv run pyrefly check | |
| - name: Tests | |
| run: uv run pytest --cov | |
| platform-smoke: | |
| name: Platform smoke (${{ matrix.os }}, Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, macos-latest] | |
| python-version: ['3.11', '3.14'] | |
| env: | |
| UV_PYTHON: ${{ matrix.python-version }} | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| # Service containers are unavailable on Windows and macOS hosted runners, | |
| # so Redis tests stay in the full Ubuntu matrix. Static quality checks also | |
| # stay there; this job targets platform-sensitive runtime behaviour only. | |
| - name: Platform-sensitive runtime tests | |
| run: >- | |
| uv run pytest | |
| tests/test_breaker.py | |
| tests/test_concurrency.py | |
| tests/test_engine.py | |
| tests/test_shutdown.py | |
| tests/test_windows.py | |
| tests/test_timeout.py | |
| tests/test_pipeline.py | |
| tests/test_state_machine.py | |
| tests/test_state_machine_model.py | |
| tests/test_state_machine_properties.py | |
| tests/test_typing.py | |
| tests/test_e2e.py | |
| tests/test_httpx_e2e.py | |
| tests/test_httpx2_e2e.py | |
| tests/test_aiohttp.py | |
| extras-min: | |
| name: Extras (minimum versions) | |
| runs-on: ubuntu-latest | |
| env: | |
| UV_PYTHON: '3.11' | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Pin extras to minimum supported versions | |
| run: >- | |
| uv pip install | |
| 'httpx==0.27.0' | |
| 'httpx2==2.4.0' | |
| 'fastapi==0.128.0' | |
| 'redis==5.0.0' | |
| 'opentelemetry-api==1.20.0' | |
| 'tenacity==9.0.0' | |
| 'requests==2.31.0' | |
| 'aiohttp==3.12.0' | |
| 'litestar==2.23.0' | |
| - name: Integration tests against minimum versions | |
| run: >- | |
| uv run --no-sync pytest | |
| tests/test_httpx.py | |
| tests/test_httpx_e2e.py | |
| tests/test_httpx2.py | |
| tests/test_httpx2_e2e.py | |
| tests/test_fastapi.py | |
| tests/test_otel.py | |
| tests/test_redis_storage.py | |
| tests/test_tenacity.py | |
| tests/test_requests.py | |
| tests/test_aiohttp.py | |
| tests/test_litestar.py | |
| packaging-smoke: | |
| name: Packaging smoke test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Build sdist and wheel | |
| run: uv build | |
| # Metadata rendering and wheel layout are unfixable after upload — a | |
| # version cannot be reused. Catch stray top-level files, missing or | |
| # duplicated packages, and PyPI long-description rendering errors here. | |
| - name: twine check | |
| run: uv run twine check dist/* | |
| - name: check-wheel-contents | |
| run: uv run check-wheel-contents dist/*.whl | |
| # A venv separate from the `uv sync` one above: no dev group, no extras. | |
| # This is what `pip install interlock-cb` actually gets a user. | |
| - name: Install the wheel into a clean environment | |
| run: | | |
| uv venv --python 3.11 "${RUNNER_TEMP}/smoke-env" | |
| uv pip install --no-deps --python "${RUNNER_TEMP}/smoke-env" dist/*.whl | |
| # `interlock.__version__` must match the installed distribution's | |
| # metadata, and `py.typed` plus every `interlock/integrations/*.py` | |
| # module must have survived the build — an accidental import of an | |
| # optional dependency from the core, or a packaging config that drops a | |
| # subpackage, would pass the dev-env test suite but break here. | |
| - name: Import smoke test | |
| run: | | |
| "${RUNNER_TEMP}/smoke-env/bin/python" - <<'PY' | |
| import importlib.metadata | |
| import importlib.resources as resources | |
| import pathlib | |
| import interlock | |
| import interlock.integrations | |
| installed_version = importlib.metadata.version('interlock-cb') | |
| assert interlock.__version__ == installed_version, ( | |
| interlock.__version__, | |
| installed_version, | |
| ) | |
| assert (resources.files('interlock') / 'py.typed').is_file(), ( | |
| 'py.typed missing from the wheel' | |
| ) | |
| source_files = { | |
| p.name for p in pathlib.Path('interlock/integrations').glob('*.py') | |
| } | |
| wheel_files = { | |
| p.name | |
| for p in resources.files('interlock.integrations').iterdir() | |
| if p.name.endswith('.py') | |
| } | |
| missing = source_files - wheel_files | |
| assert not missing, f'missing from the wheel: {sorted(missing)}' | |
| print( | |
| f'OK: interlock {interlock.__version__}, py.typed present, ' | |
| f'{len(wheel_files)} integration modules packaged' | |
| ) | |
| PY | |
| docs: | |
| name: Docs | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Build site (strict) | |
| run: uv run zensical build --strict | |
| coverage: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| env: | |
| INTERLOCK_TEST_REDIS_URL: redis://localhost:6379/0 | |
| services: | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync --frozen | |
| - name: Run tests with coverage | |
| run: >- | |
| uv run pytest --cov --cov-report=xml | |
| --junitxml=junit.xml -o junit_family=legacy | |
| # `fail_ci_if_error` is not a flat `true`: a Dependabot run resolves | |
| # `secrets.*` against a separate secret store, so a `CODECOV_TOKEN` drift | |
| # there turns the required check red on every bump PR at once. The gate is | |
| # `fail_under = 100`, which the step above already enforced — Codecov only | |
| # mirrors it — so a rejected upload on a bot PR is a reporting outage; | |
| # human PRs and pushes to main still fail hard on one. `github.actor` | |
| # survives a manual re-run, `github.triggering_actor` does not. | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.xml | |
| fail_ci_if_error: ${{ github.actor != 'dependabot[bot]' }} | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: junit.xml | |
| fail_ci_if_error: ${{ github.actor != 'dependabot[bot]' }} |