360cfe98c9
CI / backend (pull_request) Successful in 49s
CI / frontend (pull_request) Successful in 18s
CI / format (pull_request) Successful in 49s
CI / db-tests (pull_request) Successful in 50s
Security / secrets (pull_request) Successful in 3s
Security / dependencies (pull_request) Successful in 52s
Implements AUDIT_REPORT.md M-7 and L-10: - M-7: new CI job 'db-tests' runs Category=LiveDb tests against a pgvector/pg16 service container — permanent regression coverage for the search paths the InMemory provider can't translate (ts_rank_cd weighting, ts_headline sentinels, pg_trgm typo fallback, pgvector cosine ordering). Previously these were only verified manually. Tests soft-skip when LIVEDB_CONNECTION is unset, so local and existing CI runs are unaffected. Verified green against a real pgvector container. - L-10: 'format' CI job (dotnet format --verify-no-changes) so --no-verify pushes can't bypass the formatting gate. - frontend job: node 20 -> 22 (aligns with the vite 8 upgrade). Full suite: 54/54 (51 + 3 LiveDb when live). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
81 lines
2.4 KiB
YAML
81 lines
2.4 KiB
YAML
name: CI
|
|
|
|
# Build + test gate. Runs on pushes to the long-lived branches and on every PR so
|
|
# the 39-test suite (and both builds) must pass before merge.
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
|
|
jobs:
|
|
backend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '8.0.x'
|
|
- name: Restore
|
|
run: dotnet restore InboxIntel.sln
|
|
- name: Build
|
|
run: dotnet build InboxIntel.sln -c Release --no-restore
|
|
- name: Test
|
|
run: dotnet test InboxIntel.sln -c Release --no-build --verbosity normal
|
|
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: frontend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
- name: Install
|
|
run: npm ci
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
# AUDIT L-10: the pre-commit hook enforces formatting locally, but --no-verify or web edits
|
|
# can bypass it — this makes the same check a server-side gate.
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '8.0.x'
|
|
- name: dotnet format (verify only)
|
|
run: dotnet format InboxIntel.sln --verify-no-changes
|
|
|
|
# AUDIT M-7: the search paths the InMemory provider can't translate (FTS ranking,
|
|
# ts_headline, pg_trgm, pgvector) previously had only manual verification. This job runs
|
|
# the Category=LiveDb tests against a real pgvector Postgres service container.
|
|
db-tests:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
postgres:
|
|
image: pgvector/pgvector:pg16
|
|
env:
|
|
POSTGRES_USER: test
|
|
POSTGRES_PASSWORD: test
|
|
POSTGRES_DB: test
|
|
env:
|
|
LIVEDB_CONNECTION: "Host=postgres;Port=5432;Database=test;Username=test;Password=test"
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '8.0.x'
|
|
- name: Wait for Postgres
|
|
run: |
|
|
for i in $(seq 1 30); do
|
|
(echo > /dev/tcp/postgres/5432) 2>/dev/null && exit 0
|
|
sleep 1
|
|
done
|
|
echo "Postgres service did not become reachable" >&2
|
|
exit 1
|
|
- name: Live-DB tests
|
|
run: dotnet test InboxIntel.sln --filter "Category=LiveDb" --verbosity normal
|