From dae9e64011a2b6120cc51218913f1ce65da92621 Mon Sep 17 00:00:00 2001 From: tcheeric Date: Fri, 25 Sep 2026 00:55:21 +0100 Subject: [PATCH] ci: bound every job, and allow manual runs Neither job had timeout-minutes, so both inherited GitHub's 360 minute default. The same gap in nap-java let a stuck scan run for 50 minutes before I noticed, and it would have gone to six hours unattended. vitest spawns workers and the voucher suite talks to a local mint, so a child that never exits is the realistic way this hangs. Caps are sized for a hang rather than for slowness: both jobs finish in about a minute today, so 20 and 15 leave room for the suite to grow without the cap becoming the thing that fails. workflow_dispatch for the same reason it was added to nap-java. The audit job asks npm's advisory database a question whose answer changes without this repository changing, so re-checking it should not require inventing a commit. Nothing here caches on failure. `cache: npm` is managed by setup-node and restores from the registry, so it does not have nap-java's problem of an expensive artifact discarded whenever the job fails. --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c926308..c38a99b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,10 @@ on: - master - develop pull_request: + # Manual runs. The audit job asks npm's advisory database a question whose answer + # changes without this repository changing, so re-checking it should not require + # inventing a commit. + workflow_dispatch: concurrency: group: ci-${{ github.workflow }}-${{ github.ref }} @@ -16,6 +20,10 @@ jobs: validate: name: Validate (Node ${{ matrix.node }}) runs-on: ubuntu-latest + # Observed around 1 minute. The cap is for a hang rather than for slowness: vitest + # spawns workers and the voucher suite talks to a local mint, so a child that never + # exits would otherwise sit on GitHub's 360 minute default. + timeout-minutes: 20 strategy: fail-fast: false matrix: @@ -45,6 +53,9 @@ jobs: audit: name: Dependency audit runs-on: ubuntu-latest + # Observed under a minute. The cap covers the npm advisory endpoint failing to + # answer rather than refusing, which no amount of waiting would improve. + timeout-minutes: 15 steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4