Skip to content

ci: add fast build-free lint gate for PRs and pushes to main - #8

Merged
dmang-dev merged 3 commits into
mainfrom
ci/add-pr-lint-gate
Jul 1, 2026
Merged

ci: add fast build-free lint gate for PRs and pushes to main#8
dmang-dev merged 3 commits into
mainfrom
ci/add-pr-lint-gate

Conversation

@dmang-dev

Copy link
Copy Markdown
Owner

What

Add a fast, build-free CI gate that runs on every pull_request and every push to main.

Until now the only workflow (build-libraries.yml) was manual-dispatch-only, so PRs and merges received zero automated checks (confirmed by an audit of all 10 historical runs — every one was a manual dispatch). This adds real merge-gating without the ~90-min toolchain build.

Jobs (~1-2 min total, ubuntu, read-only token)

Job Checks Why
workflows + shell actionlint on .github/workflows + shellcheck on tracked *.sh actionlint catches the exact class of workflow bug that silently broke this pipeline (bad if:, expressions, deprecated runners); with shellcheck on PATH it also lints run: blocks
powershell PSScriptAnalyzer on *.ps1 gates bootstrap-windows.ps1 on Error-level findings
  • actionlint pinned to v1.7.12, installed via go install (checksum-verified through the Go proxy — no curl \| bash)
  • concurrency cancels superseded runs; the heavy toolchain build stays on manual dispatch by design

This PR is its own first test — the gate runs against itself here. Merging is contingent on it going green.

🤖 Generated with Claude Code

dk-dev and others added 3 commits July 1, 2026 09:24
The only existing workflow (build-libraries.yml) is manual-dispatch-only, so
PRs and merges got zero automated checks. Add a CI workflow that lints the
file types that actually change here and have broken the pipeline before:

- shellcheck on tracked *.sh
- actionlint on .github/workflows (also shellchecks run: blocks)
- PSScriptAnalyzer on *.ps1 (fails on Error-level findings)

Runs in ~1-2 min on ubuntu, read-only token, cancels superseded runs. The
heavy ~90-min toolchain build stays on manual dispatch by design.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
First run of the new gate flagged 3 shellcheck warnings in
tools/build-library-bundle.sh: SC2209 (quote the pkg_for[] string values) and
two SC2154 false positives (source[]/sha256sums[] come from the sourced
PSPBUILD). Quote the package-name map and annotate the two PKGBUILD-derived
arrays with disable directives.

Split ci.yml into three independent jobs (shellcheck / actionlint /
powershell) so each linter reports even when another fails, instead of
fail-fast hiding actionlint behind a shellcheck failure.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The explanatory comment above the SC2154 disable started a line with '# shellcheck can't see...', which shellcheck parsed as a malformed directive (SC1072/SC1073). Reword so no comment line begins with the directive token.
@dmang-dev
dmang-dev merged commit 7c5c226 into main Jul 1, 2026
3 checks passed
@dmang-dev
dmang-dev deleted the ci/add-pr-lint-gate branch July 1, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants