Backend: add apt-get install libsqlcipher-dev before pip install so pysqlcipher3 builds in the runner image. Frontend: prep.test.ts was missing a qa mock (fetchFor now calls 5 endpoints in parallel; tests only mocked 4 — 5th returned undefined, threw in catch, research.value never set). survey.test.ts: analyze() was refactored from sync-result to async-task+poll; update test to mock POST then poll completion. Also remove Classic UI (Streamlit) button from AppNav — Streamlit is deprecated and the button caused an unrecoverable redirect loop.
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
# Peregrine CI — lint, type-check, test on PR/push
|
|
# Full-stack: FastAPI (Python) + Vue 3 SPA (Node)
|
|
# Adapted from Circuit-Forge/cf-agents workflows/ci.yml (cf-agents#4 tracks the
|
|
# upstream ci-fullstack.yml variant; update this file when that lands).
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, 'feature/**', 'fix/**']
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
backend:
|
|
name: Backend (Python)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
cache: pip
|
|
|
|
- name: Install system dependencies
|
|
run: sudo apt-get update -q && sudo apt-get install -y libsqlcipher-dev
|
|
|
|
- name: Install dependencies
|
|
run: pip install -r requirements.txt
|
|
|
|
- name: Lint
|
|
run: ruff check .
|
|
|
|
- name: Test
|
|
run: pytest tests/ -v --tb=short
|
|
|
|
frontend:
|
|
name: Frontend (Vue)
|
|
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
|
|
|
|
- name: Type check
|
|
run: npx vue-tsc --noEmit
|
|
|
|
- name: Test
|
|
run: npm run test
|