Empty but complete solution so every later phase starts from a working toolchain: analyzers as errors, locked restore, format check, policy tests that keep packages within ADR 0004 and keep live trading switched off, a /health endpoint served from Docker, and a Gitea workflow with only run steps. API facts of SPEC section 4 re-checked in docs/API-NOTES.md; ADR 0006 records what changed (MSTest base packages, Ubuntu images, OKX WebSocket on 443, Alpaca margin-only accounts). refs #1 refs #2 refs #3 refs #4 refs #5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
60 lines
1.8 KiB
YAML
60 lines
1.8 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
|
|
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 .
|