This repository was archived by the owner on Jun 24, 2026. It is now read-only.
task: relicense to Apache-2.0 with dual attribution #43
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: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # ────────────────────────────────────────────── | |
| # Changed-path detection | |
| # ────────────────────────────────────────────── | |
| changes: | |
| name: Detect Changes | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: read | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend }} | |
| frontend: ${{ steps.filter.outputs.frontend }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: dorny/paths-filter@9d7afb8d214ad99e78fbd4247752c4caed2b6e4c # v4.0.0 | |
| id: filter | |
| with: | |
| filters: | | |
| backend: | |
| - 'backend/**' | |
| frontend: | |
| - 'frontend/**' | |
| # ────────────────────────────────────────────── | |
| # Backend (backend/) | |
| # ────────────────────────────────────────────── | |
| backend-lint: | |
| name: "Backend: Lint" | |
| needs: changes | |
| if: needs.changes.outputs.backend == 'true' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| with: | |
| version: "0.6" | |
| - name: Set up Python | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run ruff check | |
| run: uv run ruff check src/ tests/ | |
| - name: Run ruff format check | |
| run: uv run ruff format --check src/ tests/ | |
| backend-typecheck: | |
| name: "Backend: Type Check" | |
| needs: changes | |
| if: needs.changes.outputs.backend == 'true' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| with: | |
| version: "0.6" | |
| - name: Set up Python | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run mypy | |
| run: uv run python -m mypy src/ --strict | |
| backend-test: | |
| name: "Backend: Test" | |
| needs: changes | |
| if: needs.changes.outputs.backend == 'true' | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: backend | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| with: | |
| version: "0.6" | |
| - name: Set up Python | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Run tests with coverage | |
| run: uv run python -m pytest tests/ --cov=src/retriever --cov-report=term-missing --cov-fail-under=80 | |
| # ────────────────────────────────────────────── | |
| # Frontend (frontend/) | |
| # ────────────────────────────────────────────── | |
| frontend-check: | |
| name: "Frontend: Check" | |
| needs: changes | |
| if: needs.changes.outputs.frontend == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| PUBLIC_SUPABASE_URL: http://localhost:54321 | |
| PUBLIC_SUPABASE_ANON_KEY: ci-placeholder | |
| PUBLIC_API_BASE_URL: http://localhost:8000 | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run svelte-check | |
| run: npm run check | |
| frontend-build: | |
| name: "Frontend: Build" | |
| needs: changes | |
| if: needs.changes.outputs.frontend == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| PUBLIC_SUPABASE_URL: http://localhost:54321 | |
| PUBLIC_SUPABASE_ANON_KEY: ci-placeholder | |
| PUBLIC_API_BASE_URL: http://localhost:8000 | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| frontend-e2e: | |
| name: "Frontend: E2E" | |
| needs: changes | |
| if: needs.changes.outputs.frontend == 'true' | |
| runs-on: ubuntu-latest | |
| env: | |
| PUBLIC_SUPABASE_URL: http://localhost:54321 | |
| PUBLIC_SUPABASE_ANON_KEY: ci-placeholder | |
| PUBLIC_API_BASE_URL: http://localhost:8000 | |
| defaults: | |
| run: | |
| working-directory: frontend | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium | |
| - name: Run E2E tests | |
| run: npm run test:e2e | |
| # ────────────────────────────────────────────── | |
| # Gate — required status check for branch protection | |
| # ────────────────────────────────────────────── | |
| all-checks: | |
| name: All Checks Passed | |
| runs-on: ubuntu-latest | |
| if: always() | |
| needs: | |
| - backend-lint | |
| - backend-typecheck | |
| - backend-test | |
| - frontend-check | |
| - frontend-build | |
| - frontend-e2e | |
| steps: | |
| - name: Check all jobs passed | |
| run: | | |
| results=( | |
| "${{ needs.backend-lint.result }}" | |
| "${{ needs.backend-typecheck.result }}" | |
| "${{ needs.backend-test.result }}" | |
| "${{ needs.frontend-check.result }}" | |
| "${{ needs.frontend-build.result }}" | |
| "${{ needs.frontend-e2e.result }}" | |
| ) | |
| for r in "${results[@]}"; do | |
| if [[ "$r" != "success" && "$r" != "skipped" ]]; then | |
| echo "Job failed with result: $r" | |
| exit 1 | |
| fi | |
| done | |
| echo "All checks passed!" |