fix(ci): post-runner-image cleanup #7

Merged
julien merged 3 commits from fix/ci/post-runner-image-cleanup into main 2026-05-04 14:55:15 +02:00

3 Commits

Author SHA1 Message Date
Julien Gautier 0ceb7fea68 fix(ci): pass --no-sandbox to Chrome in Lighthouse CI
CI / scan (pull_request) Failing after 6m4s
CI / commits (pull_request) Successful in 11m3s
CI / check (pull_request) Successful in 11m16s
CI / perf (pull_request) Successful in 10m49s
CI / a11y (pull_request) Successful in 10m4s
Chrome's user-namespace sandbox is unusable inside the act runner
container — the host kernel's AppArmor profile (Ubuntu 23.10+) blocks
unprivileged user namespaces, so Chrome aborts at the zygote stage
with `No usable sandbox`. Lighthouse never connects to the browser
and the perf gate fails.

`--no-sandbox` is the standard workaround documented by Lighthouse,
Puppeteer, and Playwright for containerised CI. The residual risk is
acceptable: the browser only loads our own freshly built bundle from
http://localhost:4200/ inside an ephemeral self-hosted runner — no
untrusted content reaches the renderer.
2026-05-04 14:25:28 +02:00
Julien Gautier e59d3a010b fix(ci): drop invalid git fetch --depth=0 in Nx base resolution
CI / check (pull_request) Successful in 13m40s
CI / scan (pull_request) Failing after 8m16s
CI / commits (pull_request) Successful in 15m29s
CI / perf (pull_request) Failing after 24m22s
CI / a11y (pull_request) Successful in 11m14s
`actions/checkout@v4` already runs with `fetch-depth: 0`, which pulls
every branch and tag — origin/<base_ref> is therefore present locally
and the explicit fetch is redundant. The flag value `--depth=0` is
itself invalid (git requires a positive integer), so the step failed
with `fatal: depth 0 is not a positive number` on every PR run.
2026-05-04 13:28:19 +02:00
Julien Gautier 1117d7fb89 fix(ci): post-runner-image cleanup
CI / check (pull_request) Failing after 8s
CI / scan (pull_request) Failing after 7m23s
CI / commits (pull_request) Successful in 13m50s
CI / a11y (pull_request) Successful in 13m47s
CI / perf (pull_request) Failing after 52m25s
Three follow-up fixes uncovered by the first end-to-end CI run on the
self-hosted act_runner image:

- Replace `nrwl/nx-set-shas@v4` with a manual shell step. The action
  queries the GitHub API to discover the last successful workflow run
  and returns 404 on Gitea. The replacement derives NX_BASE/NX_HEAD
  from local git history (merge-base with the target branch on
  pull_request, HEAD~1 on push to main).
- Pin the `perf` job to `catthehacker/ubuntu:full-22.04` so Lighthouse
  CI finds a real Chrome. The default act image (act-22.04) is the
  minimal variant and ships without browsers.
- Declare `pnpm.onlyBuiltDependencies` to silence the "Ignored build
  scripts" warning and approve only the packages whose post-install
  hooks we actually rely on (Nx, Prisma, esbuild, swc, native
  watchers/resolvers).
2026-05-04 13:22:21 +02:00