CI #10
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: | |
| branches: [main] | |
| workflow_dispatch: | |
| schedule: | |
| # Weekly probe re-run: Monday 06:00 UTC | |
| - cron: "0 6 * * 1" | |
| jobs: | |
| contract-tests: | |
| name: Contract Tests (fast) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: uv sync | |
| - name: Run contract tests | |
| run: uv run pytest -v | |
| - name: Type check | |
| run: uv run mypy src/ tests/ | |
| probe-tests: | |
| name: Probe Tests (slow, loads models) | |
| runs-on: ubuntu-latest | |
| # Only on schedule or manual dispatch — probes download large models | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Install all engine dependencies | |
| run: uv sync --group dev | |
| - name: Run probe tests | |
| run: uv run pytest -m probe -v | |
| - name: Regenerate policy table | |
| run: uv run python -m engine_contracts.policy | |
| - name: Check for baseline drift | |
| run: | | |
| if git diff --name-only results/ | grep -q .; then | |
| echo "::warning::Probe results changed — engine behavior may have drifted" | |
| git diff results/ | |
| fi |