|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ci-${{ github.workflow }}-${{ github.ref }} |
| 14 | + cancel-in-progress: true |
| 15 | + |
| 16 | +jobs: |
| 17 | + quality: |
| 18 | + name: Quality |
| 19 | + runs-on: ubuntu-latest |
| 20 | + timeout-minutes: 10 |
| 21 | + steps: |
| 22 | + - name: Check out repository |
| 23 | + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 24 | + with: |
| 25 | + persist-credentials: false |
| 26 | + - name: Install uv |
| 27 | + uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 |
| 28 | + with: |
| 29 | + enable-cache: true |
| 30 | + - name: Set up Python |
| 31 | + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
| 32 | + with: |
| 33 | + python-version: "3.14" |
| 34 | + - name: Install locked dependencies |
| 35 | + run: uv sync --locked --dev |
| 36 | + - name: Lint |
| 37 | + run: uv run ruff check . |
| 38 | + - name: Check formatting |
| 39 | + run: uv run ruff format --check . |
| 40 | + - name: Type-check runtime files |
| 41 | + run: >- |
| 42 | + uv run mypy |
| 43 | + 01-structured-shell/run_loud.py |
| 44 | + 02-structured-tests/pytest_jsonl_reporter.py |
| 45 | + 03-verification-gate/check_evidence.py |
| 46 | + 03-verification-gate/verify.py |
| 47 | + 04-stop-hook/no_completion_without_evidence.py |
| 48 | + 05-prompt-cache/cacheable_prompt.py |
| 49 | + - name: Audit Python dependencies |
| 50 | + run: uv run pip-audit |
| 51 | + |
| 52 | + test: |
| 53 | + name: Test (Python ${{ matrix.python-version }}) |
| 54 | + runs-on: ubuntu-latest |
| 55 | + timeout-minutes: 10 |
| 56 | + strategy: |
| 57 | + fail-fast: false |
| 58 | + matrix: |
| 59 | + python-version: ["3.11", "3.14"] |
| 60 | + steps: |
| 61 | + - name: Check out repository |
| 62 | + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 63 | + with: |
| 64 | + persist-credentials: false |
| 65 | + - name: Install uv |
| 66 | + uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 |
| 67 | + with: |
| 68 | + enable-cache: true |
| 69 | + - name: Set up Python |
| 70 | + uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 |
| 71 | + with: |
| 72 | + python-version: ${{ matrix.python-version }} |
| 73 | + - name: Install locked dependencies |
| 74 | + run: uv sync --locked --dev |
| 75 | + - name: Test |
| 76 | + run: uv run pytest --cov=. --cov-report=term-missing --cov-report=xml |
| 77 | + - name: Upload coverage report |
| 78 | + if: matrix.python-version == '3.14' |
| 79 | + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
| 80 | + with: |
| 81 | + name: coverage-report |
| 82 | + path: coverage.xml |
| 83 | + if-no-files-found: error |
| 84 | + retention-days: 14 |
0 commit comments