d03ca01172
CI / backend (pull_request) Successful in 52s
CI / frontend (pull_request) Successful in 23s
CI / format (pull_request) Successful in 51s
CI / db-tests (pull_request) Successful in 52s
Security / secrets (pull_request) Successful in 4s
Security / dependencies (pull_request) Successful in 1m1s
.NET 8 security support ends 2026-11-10; .NET 10 is LTS to Nov 2028. - TargetFramework net8.0 -> net10.0 (Directory.Build.props) - EF Core 8.0.4 -> 10.0.9; Npgsql provider 8.0.4 -> 10.0.2; Pgvector.EFCore 0.2.0 -> 0.3.0; ASP.NET/Extensions packages -> 10.0.9 - Dockerfile sdk/aspnet 8.0 -> 10.0; CI setup-dotnet -> 10.0.x - Modernised deprecated APIs: X509CertificateLoader (SYSLIB0057), KnownIPNetworks + System.Net.IPNetwork.Parse (ASPDEPR005) - Adapted tests to Npgsql 10's eager connection-string validation (dummy conn string in test factories; behaviour change from lazy 8.x) Verified: 0 errors/0 warnings; all 54 tests green on net10; the 3 LiveDb tests green against a real pgvector container on the new EF10/Npgsql10/Pgvector 0.3 stack; dotnet format clean; vulnerable-package scan clean; the .NET 10 API Docker image builds successfully. 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: '10.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: '10.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: '10.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
|