Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/guid-index.json
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@
"path": ".github/workflows/reusable-ci.yml",
"guid": "reusable-ci-2025-09-24-core-workflow",
"title": "Reusable CI Workflow",
"version": "1.20.1",
"version": "1.21.0",
"header_path": ".github/workflows/reusable-ci.yml",
"path_mismatch": false
},
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/reusable-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# file: .github/workflows/reusable-ci.yml
# version: 1.20.1
# version: 1.21.0
# guid: reusable-ci-2025-09-24-core-workflow
# last-edited: 2026-11-06
# last-edited: 2026-11-07

name: Reusable CI Workflow

Expand Down Expand Up @@ -59,6 +59,16 @@ on:
required: false
type: boolean
default: false
run-frontend:
description: >-
Run the frontend jobs (frontend-npm-cache and frontend-ci). Set false
when the caller installs, builds and tests its frontend itself, e.g.
through its own script, so this workflow's own `npm ci` never runs.
Forces the `frontend-files` output to false. Same name and meaning
as reusable-ci-minimal.yml's run-frontend.
required: false
type: boolean
default: true
skip-linting:
description: 'Skip linting'
required: false
Expand Down Expand Up @@ -371,6 +381,7 @@ jobs:
RUST_HIT: ${{ steps.changes.outputs.rust_files || steps.inventory.outputs.rust_files }}
PYTHON_HIT: ${{ steps.changes.outputs.python_files || steps.inventory.outputs.python_files }}
FRONTEND_HIT: ${{ steps.changes.outputs.frontend_files || steps.inventory.outputs.frontend_files }}
RUN_FRONTEND: ${{ inputs.run-frontend }}
run: |
tracked() {
[[ -n "$(git ls-files -- "$1")" ]]
Expand All @@ -396,6 +407,10 @@ jobs:
python=false
fi
frontend="${FRONTEND_HIT:-false}"
if [[ "$frontend" == true && "$RUN_FRONTEND" != true ]]; then
echo "frontend_files: run-frontend is false, not running frontend-ci"
frontend=false
fi
if [[ "$frontend" == true ]] && ! tracked "$frontend_manifest"; then
echo "frontend_files: no $frontend_manifest, not running frontend-ci"
frontend=false
Expand Down
16 changes: 16 additions & 0 deletions changelog.d/20261107-reusable-ci-run-frontend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
### Added

#### `reusable-ci.yml` gains a `run-frontend` input to skip the frontend jobs

`reusable-ci.yml` had no way to skip its frontend half; only
`reusable-ci-minimal.yml` had `run-frontend`. A caller that installs its web
dependencies through its own script (for example because the frontend depends
on a sibling workspace package that a plain `npm ci` cannot resolve) still got
`frontend-npm-cache` and `frontend-ci` running their own install.

`run-frontend` (boolean, default `true`, same name and meaning as in the minimal
workflow) is applied in the change-detection gate: when `false`, the
`frontend-files` output is forced to `false`, so `frontend-npm-cache` and
`frontend-ci` are skipped through their existing `if:` conditions. `ci-summary`
already maps a skipped frontend job to `skipped`, which is not a failure. The
default keeps every existing caller's behaviour unchanged.
Loading