Skip to content

Commit b6b24b4

Browse files
Merge pull request #106 from loss-and-quick/ci/split-shellcheck-job
ci: split ShellCheck into its own path-gated job
2 parents 4fcde56 + f3a4a74 commit b6b24b4

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
frontend: ${{ steps.detect.outputs.frontend }}
1818
rust: ${{ steps.detect.outputs.rust }}
1919
desktop: ${{ steps.detect.outputs.desktop }}
20+
shell: ${{ steps.detect.outputs.shell }}
2021
steps:
2122
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
2223
with:
@@ -38,6 +39,7 @@ jobs:
3839
echo "frontend=true"
3940
echo "rust=true"
4041
echo "desktop=true"
42+
echo "shell=true"
4143
} >> "$GITHUB_OUTPUT"
4244
exit 0
4345
fi
@@ -48,14 +50,16 @@ jobs:
4850
# PR diff semantics.
4951
files=$(git diff --name-only "$base...$head")
5052
match() { printf '%s\n' "$files" | grep -Eq "$1"; }
51-
fe=false; rs=false; dk=false
52-
match '^(frontend/|module/|scripts/|package\.json|bun\.lock|biome\.json)' && fe=true
53+
fe=false; rs=false; dk=false; sh=false
54+
match '^(frontend/|package\.json|bun\.lock|biome\.json)' && fe=true
5355
match '^(crates/|src-tauri/|Cargo\.(toml|lock)|flake\.(nix|lock))' && rs=true
5456
match '^(crates/|src-tauri/|frontend/|Cargo\.(toml|lock))' && dk=true
57+
match '^(module/|scripts/)' && sh=true
5558
{
5659
echo "frontend=$fe"
5760
echo "rust=$rs"
5861
echo "desktop=$dk"
62+
echo "shell=$sh"
5963
} >> "$GITHUB_OUTPUT"
6064
6165
# ── Frontend: bun workspace (lockfile at the repo root), biome, build, tests ──
@@ -92,6 +96,16 @@ jobs:
9296
- name: i18n dictionaries
9397
run: bun run frontend/scripts/check-i18n.ts
9498

99+
# ── ShellCheck the module + build/release scripts. Split out from the frontend
100+
# job so a scripts-only / module-only change runs just this (seconds) instead
101+
# of the whole bun install + build + vitest. shellcheck ships on the runner. ──
102+
shellcheck:
103+
needs: changes
104+
if: needs.changes.outputs.shell == 'true'
105+
runs-on: ubuntu-latest
106+
steps:
107+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
108+
95109
- name: ShellCheck
96110
run: |
97111
# The module is now a thin launcher over the Rust daemon: service.sh /
@@ -239,7 +253,7 @@ jobs:
239253
# failure or cancellation fails CI. Point branch protection at THIS context so
240254
# path-skipped jobs never block a merge. ──
241255
ci:
242-
needs: [changes, frontend, rust, desktop-linux, desktop-windows]
256+
needs: [changes, frontend, shellcheck, rust, desktop-linux, desktop-windows]
243257
if: always()
244258
runs-on: ubuntu-latest
245259
steps:

0 commit comments

Comments
 (0)