Phase 1 foundations in the Anubis library: - Platform: startup configuration from environment variables (Docker) or config.toml (desktop, in-house TOML subset), data folder layout, secret key custody (ANUBIS_SECRET_KEY, DPAPI on Windows, restricted file elsewhere), installation identity and database fingerprint. - Db: ADO.NET with Npgsql and Microsoft.Data.Sqlite, money as NUMERIC(38,18) or canonical text rounded to 18 decimals, UTC moments, UUIDv7 ids; numbered SQL migrations with type tokens and a version table; engine-independent export/import with count and accounting-total checks; backups keeping 14. - Core: injectable clock, channel event bus, scheduler with fixed, interval and market-relative times, settings with change log, AES-GCM secrets, log redaction, Italian formats. - Access: PBKDF2-SHA512 hashes, RFC 6238 TOTP, hashed session tokens, sign-in attempt limit. SQLitePCLRaw (Apache-2.0) arrives with Microsoft.Data.Sqlite and is declared in DependencyPolicyTests and API-NOTES. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
66 lines
2.1 KiB
YAML
66 lines
2.1 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"
|
|
ANUBIS_TEST_PG_PASSWORD: anubis-ci
|
|
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 .
|