CI: lint, type checks, tests and web build on every PR #1
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 | |
| jobs: | |
| api: | |
| name: API (ruff, mypy, pytest) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: API | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: API/uv.lock | |
| - name: Set up Python | |
| run: uv python install 3.11 | |
| - name: Install dependencies | |
| run: uv sync --all-extras --frozen | |
| - name: Ruff | |
| run: uv run ruff check app tests | |
| - name: Format check | |
| run: uv run black --check app tests && uv run isort --check-only app tests | |
| - name: Mypy (strict) | |
| run: uv run mypy app | |
| - name: Tests | |
| # Hermetic: model calls use DSPy's DummyLM and embeddings a local stand-in. | |
| run: uv run pytest tests -q | |
| web: | |
| name: Web (tsc, build) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: Web | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: Web/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| - name: Type check | |
| run: npx tsc --noEmit | |
| - name: Build | |
| run: npm run build |