fix(ci): remove invalid secrets ref in deploy job if #9
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
| # CI gate. The OFFLINE jobs run on every PR/push — deterministic and creds-free: | |
| # contract : the CONTRACT-DRIFT check (schemas/contract.py ↔ lib/contract.ts must stay in sync) — stdlib only. | |
| # backend : install backend[dev], topology/creds unit tests, the offline skill smoke tests, the offline | |
| # follow-up test (its live half self-skips without creds). | |
| # frontend : `npm ci && npm run build` (tsc -b + vite build) — catches type/contract breaks in the UI. | |
| # The LIVE job (`live`) is MANUAL only (workflow_dispatch) so it never burns Gemini/BigQuery $ on every push — run | |
| # it from the Actions tab when you want the live critic-loop regression. Needs the GCP_SA_KEY repo secret (a | |
| # dry-lab-run@ service-account key); absent ⇒ the job's live step is skipped, not failed. | |
| # Best-practice upgrade for later: Workload Identity Federation (keyless OIDC) instead of a long-lived key. | |
| # Mirrors the `make test` (offline) / `make test-live` (creds) targets so the same gate runs locally. | |
| name: ci | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: # manual trigger — the only thing that runs the (creds-spending) `live` job | |
| jobs: | |
| contract: | |
| name: contract-drift (contract.py ↔ contract.ts) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Assert the view-model mirrors stay in sync (no install needed — stdlib only) | |
| working-directory: backend | |
| run: python -m eval.check_contract_drift | |
| backend: | |
| name: backend offline gate | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install backend (editable) + dev tools | |
| run: pip install -e "backend[dev]" | |
| - name: Unit tests (topology + sandbox creds-scrub) — offline | |
| working-directory: backend | |
| run: python -m pytest tests -q | |
| - name: Skill smoke tests on synthetic data — offline, no BigQuery/LLM | |
| working-directory: backend | |
| run: | | |
| python -m eval._smoke_marts_skills | |
| python -m eval._smoke_dose_response | |
| python -m eval._smoke_survival | |
| - name: Follow-up / refinement test (offline half; live half self-skips without creds) | |
| working-directory: backend | |
| run: python -m eval.test_followup | |
| frontend: | |
| name: frontend build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install + build the Vite/TS UI (tsc -b catches contract type breaks) | |
| working-directory: frontend | |
| run: | | |
| npm ci | |
| npm run build | |
| live: | |
| # MANUAL ONLY — runs the live critic-loop regression against Vertex. Never on a PR/push (would spend | |
| # Gemini/BigQuery $ every time). Trigger from the Actions tab ("Run workflow") when you want it. | |
| name: live critic-loop (manual) | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| runs-on: ubuntu-latest | |
| env: | |
| GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} | |
| GOOGLE_CLOUD_PROJECT: gen-lang-client-0190297078 | |
| GOOGLE_CLOUD_LOCATION: us-central1 | |
| GOOGLE_GENAI_USE_VERTEXAI: "true" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install backend (editable) + dev tools | |
| run: pip install -e "backend[dev]" | |
| - name: Live critic-loop regression (needs the GCP_SA_KEY secret; skipped if unset) | |
| if: ${{ env.GCP_SA_KEY != '' }} | |
| working-directory: backend | |
| run: | | |
| echo "$GCP_SA_KEY" > "$RUNNER_TEMP/sa.json" | |
| export GOOGLE_APPLICATION_CREDENTIALS="$RUNNER_TEMP/sa.json" | |
| python -m eval.test_critic_loop |