Files
Inboxintel/.gitea/workflows/ci.yml
T
cesnimda a3d8654198
CI / backend (push) Successful in 52s
CI / frontend (push) Successful in 12s
CI / format (push) Successful in 48s
CI / db-tests (push) Successful in 51s
Deploy Staging / deploy (push) Successful in 26s
CI / backend (pull_request) Successful in 52s
CI / frontend (pull_request) Successful in 12s
CI / format (pull_request) Successful in 46s
CI / db-tests (pull_request) Successful in 50s
Security / secrets (push) Successful in 3s
Security / dependencies (push) Successful in 59s
Security / secrets (pull_request) Successful in 4s
Security / dependencies (pull_request) Successful in 57s
feat!: migrate to .NET 10 LTS (#28)
2026-07-02 16:53:24 +02:00

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