The ci.yml step assigns git status to a variable before testing it (a git failure now fails the step, as scripts/check-all.sh already did); both gates pass --untracked-files=all; the rust-check.sh comment names the real gate.
88 lines
3.7 KiB
YAML
88 lines
3.7 KiB
YAML
# Gitea Actions (same syntax as GitHub Actions), written for a self-hosted forge
|
|
# runner; no external provider.
|
|
#
|
|
# STATUS 2026-10-13: PREPARED, NEVER EXECUTED. No runner, secret or registry is
|
|
# configured on the forge; the CI/CD decision is a separate step. Until then the
|
|
# same checks run on the development machine with `pnpm check:all`
|
|
# (scripts/check-all.sh), which a future runner can call as is.
|
|
#
|
|
# The check job covers the SQL layer through the PGlite harness (no Docker); the
|
|
# supabase job replays it on the real stack. Rust (plan R0, docs/development/RUST.md):
|
|
# in this file every cargo command runs inside the reference builder image built from
|
|
# docker/rust-builder.Dockerfile (the native toolchain of the development machine runs
|
|
# the same scripts), so a runner and a developer machine use the same compiler and the
|
|
# production VPS never needs Rust.
|
|
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
|
|
jobs:
|
|
rust:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Reference Rust builder image (runner needs a Docker daemon)
|
|
run: docker build -f docker/rust-builder.Dockerfile -t faunosteo_rust_builder:1.99.0 docker
|
|
- name: fmt, clippy, tests, ts-rs export, cargo-deny (licenses, bans, sources)
|
|
run: bash docker/rust-run.sh bash scripts/rust-check.sh
|
|
- name: Committed TypeScript types match the Rust contracts (no modified or new file)
|
|
run: |
|
|
drift="$(git status --porcelain --untracked-files=all -- packages/core-wasm/types)"
|
|
if [ -n "$drift" ]; then echo "$drift"; exit 1; fi
|
|
- name: Browser module builds (size printed; the budget is asserted by the vitest proofs)
|
|
run: bash docker/rust-run.sh bash scripts/wasm-build.sh
|
|
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
needs: rust
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- name: Activate pnpm (version from package.json "packageManager")
|
|
run: corepack enable && corepack prepare --activate
|
|
- run: pnpm install --frozen-lockfile
|
|
- name: Browser module for the core-wasm proofs (same builder image as the rust job)
|
|
run: docker build -f docker/rust-builder.Dockerfile -t faunosteo_rust_builder:1.99.0 docker && bash docker/rust-run.sh bash scripts/wasm-build.sh
|
|
- run: pnpm typecheck
|
|
- run: pnpm test:run
|
|
- run: pnpm lint
|
|
- run: pnpm build
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Application image builds (runner needs a Docker daemon)
|
|
run: docker build -t faunosteo:ci .
|
|
- name: Worker sandbox tests and seccomp derivation on the musl binary that ships
|
|
run: docker build -f crates/worker/Dockerfile --target test -t faunosteo_worker:test .
|
|
- name: Worker runtime image builds and starts (configuration check, no job loop before R1)
|
|
run: |
|
|
docker build -f crates/worker/Dockerfile -t faunosteo_worker:ci .
|
|
docker run --rm --read-only --cap-drop ALL --security-opt no-new-privileges:true faunosteo_worker:ci run --check
|
|
|
|
supabase:
|
|
runs-on: ubuntu-latest
|
|
needs: check
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: .nvmrc
|
|
- run: corepack enable && corepack prepare --activate
|
|
- run: pnpm install --frozen-lockfile
|
|
- name: Start the local stack (runner needs a Docker daemon); applies migrations + seed
|
|
run: pnpm supabase start
|
|
- name: pgTAP on the real PostgreSQL image
|
|
run: pnpm db:test
|
|
- name: Generated types match the schema
|
|
run: pnpm db:types:check
|
|
- if: always()
|
|
run: pnpm supabase stop --no-backup
|