Files
Anubis/.gitea/workflows/ci.yml
T
Alby96andClaude Opus 5.5 52550ee6d1
ci / test (postgres) (push) Successful in 1m24s
ci / test (sqlite) (push) Successful in 1m35s
ci / image (push) Successful in 16s
ci / test (postgres) (pull_request) Successful in 1m11s
ci / test (sqlite) (pull_request) Successful in 1m24s
ci / image (pull_request) Successful in 14s
Close phase 0 review findings: stricter policy scans, property generator, hook
The independent review found that the policy tests could be bypassed:
Microsoft-named direct packages and GlobalPackageReference slipped past
the dependency check, the live-money scan missed the JSON, Dockerfile
and Unraid template forms, the secret scan missed short project
secrets but would have failed on the user's own ignored .env. The
scans now read only the files git would commit and cover those cases.

Also adds the fixed-seed generator for property tests, the REGISTRY
variables reserved for phase 9 in the CI, a git pre-commit hook in
place of the pre-commit tool (tasks hooks), the missing SPEC 4 facts
in API-NOTES (Fed/ECB/BLS times, USDC depth on OKX) and the full list
of today's indirect packages.

refs #3 refs #5 refs #6

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 10:05:10 +01:00

65 lines
2.0 KiB
YAML

# CI (SPEC 15.5, ADR 0003/0004): only run steps with git, dotnet and docker, no external actions.
# Publishing to the registry on v* tags arrives in phase 9 (issue #70).
name: ci
on:
push:
branches: ["**"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/dotnet/sdk:10.0
strategy:
fail-fast: false
matrix:
db: [sqlite, postgres]
services:
postgres:
image: postgres:18
env:
POSTGRES_DB: anubis
POSTGRES_USER: anubis
POSTGRES_PASSWORD: anubis-ci
options: >-
--health-cmd "pg_isready -U anubis -d anubis"
--health-interval 3s
--health-timeout 3s
--health-retries 20
env:
ANUBIS_TEST_DB: ${{ matrix.db }}
ANUBIS_TEST_PG_HOST: postgres
ANUBIS_TEST_PG_PORT: "5432"
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
DOTNET_NOLOGO: "1"
TESTINGPLATFORM_TELEMETRY_OPTOUT: "1"
steps:
- name: Checkout
run: |
git init -q .
git remote add origin "${{ github.server_url }}/${{ github.repository }}.git"
git -c http.extraHeader="Authorization: token ${{ github.token }}" fetch -q --depth 1 origin "${{ github.sha }}"
git checkout -q FETCH_HEAD
- name: Check
run: sh ./tasks.sh check
image:
needs: test
runs-on: ubuntu-latest
# Registry settings for phase 9 (issue #70): declared here, not used before then.
env:
REGISTRY: gitea.encke-hake.ts.net
REGISTRY_USER: ${{ github.repository_owner }}
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
steps:
- name: Checkout
run: |
git init -q .
git remote add origin "${{ github.server_url }}/${{ github.repository }}.git"
git -c http.extraHeader="Authorization: token ${{ github.token }}" fetch -q --depth 1 origin "${{ github.sha }}"
git checkout -q FETCH_HEAD
- name: Build image (no publish)
run: docker build -f deploy/docker/Dockerfile -t anubis:ci .