Files
0pt/.gitea/workflows/nightly.yml
T
admin c01deca048
CI (SIAX Cloud) / sonar (pull_request) Skipped
masterplan-lock / check (push) Successful in 5s
masterplan-lock / check (pull_request) Successful in 10s
CI (SIAX Cloud) / security (pull_request) Successful in 19s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 21s
CI (SIAX Cloud) / integration (pull_request) Successful in 40s
CI (SIAX Cloud) / quality (pull_request) Successful in 2m13s
ci: optimize delivery pipelines and add a production smoke gate
- One run per ref (concurrency) for CI, security, nightly and release; branch
  pushes no longer duplicate pull_request runs (push is main-only).
- Deploys keep their own concurrency group so two runs never race Coolify.
- pnpm store cache on every Node job.
- New /api/version returns the deployed commit (no secrets).
- New scheduled prod-smoke workflow: readiness, db/stripe health, running
  commit == main, and the document/credit routes exist (401/405, never 5xx).
2026-11-02 18:24:45 +01:00

57 lines
1.9 KiB
YAML

name: Nightly (SIAX Cloud)
# Nightly full-gate re-run so CI exercises the repo even without pushes:
# quality gate + advisory security scan. Fails loudly on regressions
# introduced outside push-triggered runs (e.g. dependency drift).
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # daily 04:00 UTC
concurrency:
group: nightly-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml
- name: Enable corepack + pin pnpm@9
run: |
corepack enable
corepack prepare pnpm@9 --activate
- name: Install (frozen lockfile)
run: pnpm install --frozen-lockfile
- name: Typecheck (blocking)
run: pnpm run typecheck
- name: Test (blocking)
run: pnpm run test
- name: Lint (advisory)
continue-on-error: true
run: pnpm run lint
- name: Build (blocking)
run: pnpm run build
security:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- name: Install Trivy
run: |
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
# A nightly scan exists to catch CVEs published against code that did
# not change. With `--exit-code 0` it could never report failure, so it
# could never raise that alarm -- the one job whose entire purpose is
# detection was the one guaranteed to stay green. Fixed 2026-09-08.
- name: Trivy fs scan (vuln + secrets -- fails on HIGH/CRITICAL)
run: |
trivy fs --scanners vuln,secret --severity HIGH,CRITICAL --exit-code 1 --skip-dirs 'siax/sbom' .