Files
faunosteo/.gitea/workflows/ci.yml
T
bchanot e58c7be362 fix(workspace): gate fixes after the security pass — warn-only advisories, drift gate sees new files, PATH guard appends, literal rm path, prctl arguments as unsigned long
check-all.sh gains a warn-only cargo deny check advisories stage (no nightly
job runs yet) and the ts-rs drift gate uses git status --porcelain so a new
untracked type file fails too (same in ci.yml); rust-env.sh appends an
absolute ~/.cargo/bin only; wasm-build.sh removes the literal
packages/core-wasm/pkg; the worker passes the unused prctl arguments as
c_ulong and its SAFETY comments no longer claim the kernel checks them.
2026-10-13 09:46:06 +02:00

86 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: test -z "$(git status --porcelain -- packages/core-wasm/types)" || { git status --porcelain -- packages/core-wasm/types; exit 1; }
- 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