Files
0pt/.gitea/workflows/ci.yml
T
SIAX Foundation Bot bd5e309851
CI (SIAX Cloud) / quality (push) Failing after 34s
CI (SIAX Cloud) / security (push) Failing after 36s
chore(foundation): Wave 1 scaffolding — CI gate / Dockerfile / .env.example
2026-07-20 00:01:37 +02:00

74 lines
3.6 KiB
YAML

name: CI (SIAX Cloud)
# Self-hosted CI on SIAX Cloud (Gitea Actions, runners siax-runner-1/2),
# following the fleet-wide pattern (quality gate -> advisory security scan).
#
# WHAT THIS REPO ACTUALLY SHIPS (0pt web console): a Next.js 16 app. Its
# package.json exposes exactly four scripts -- build / dev / lint / start --
# so the BLOCKING quality gate below runs the one real, installed, functional
# build script (`pnpm run build` == `next build`), which type-checks and
# compiles the whole app.
#
# Deliberately NOT run here (honest gaps, additive Wave-1 scope only):
# * lint -> the "lint" script is `eslint .` but eslint is NOT in the
# dependency tree (zero eslint entries in pnpm-lock.yaml), so a
# blocking lint step would fail on "eslint: not found" for a
# missing-devDependency reason, not a code reason. Adding eslint
# is a source/package.json change (Wave 2/3), not Wave-1
# scaffolding. Re-enable once eslint is a real devDependency.
# * typecheck-> no `typecheck` script exists, and next.config.mjs sets
# `typescript.ignoreBuildErrors: true` on purpose; `next build`
# already runs the TS compiler.
# * test -> tests/p0/*.test.ts exist but there is NO test runner installed
# (no vitest/jest in pnpm-lock.yaml) and no `test` script, so
# there is nothing to invoke. Wiring a runner is Wave 2/3.
#
# The security job is intentionally advisory (separate job, `--exit-code 0`) so
# it never blocks merges, matching the fleet convention.
on:
push:
branches: ["**"]
pull_request:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # daily safety re-run so CI runs even without a push
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Enable corepack + pin pnpm@9 (pnpm-lock.yaml is lockfileVersion 9.0)
run: |
corepack enable
corepack prepare pnpm@9 --activate
# --ignore-workspace: the repo's pnpm-workspace.yaml is a v0-export artifact
# that carries only an `allowBuilds:` block and NO `packages:` field, which
# makes pnpm abort with "packages field missing or empty". There are no real
# workspace members (only the root package.json), so ignoring the workspace
# file is a semantic no-op and lets the frozen install resolve cleanly.
- name: Install (frozen lockfile)
run: pnpm install --frozen-lockfile --ignore-workspace
- name: Build (next build -- blocking quality gate, no `|| true`)
# --ignore-workspace: `pnpm run` also re-parses pnpm-workspace.yaml and aborts
# on the missing `packages:` field unless the workspace is ignored (see above).
run: pnpm --ignore-workspace run build
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Install Trivy natively and scan the checked-out workspace directly.
# (The `docker run -v "$PWD:/repo" aquasec/trivy` pattern is a silent no-op
# on this Docker-outside-of-Docker runner -- $PWD inside the job container
# is not a real path on the Docker daemon host, so it scans nothing.)
- name: Install Trivy
run: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
- name: Trivy scan (vuln + secrets, advisory)
run: |
trivy fs --scanners vuln,secret --severity HIGH,CRITICAL --exit-code 0 .