Skip to content

chore(testing): adopt actionlint for authored and rendered workflows - #1001

Merged
c-vigo merged 4 commits into
feature/988-mode-aware-scaffoldfrom
feature/995-actionlint
Jul 13, 2026
Merged

c-vigo merged 4 commits into
feature/988-mode-aware-scaffoldfrom
feature/995-actionlint

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Adopts actionlint (nixpkgs 1.7.12) so GitHub Actions workflows — both the
devkit's own authored workflows and the per-mode rendered scaffold output —
are validated semantically, not just yamllint/grep-checked. Closes a gap where a
broken needs/outputs wiring or invalid expression in a rendered workflow
would ship silently and only fail in a consumer repo.

Part of #988. Supports #991/#994 verification.

What changed

  • Toolchain (nix/devtools.nix): actionlint added to the vigOS toolchain
    SSoT — available in the dev-shell, the Nix-built image, and the
    vigos.packages home module (so consumers get the binary too).
  • Pre-commit hook (nix/hooks.nix → rendered into .pre-commit-config.yaml):
    an actionlint hook that auto-discovers and lints the devkit's own
    .github/workflows/, with the bundled shellcheck disabled (-shellcheck=).
  • bats (tests/bats/init-workspace.bats): five new tests that scaffold each
    delivery mode (devcontainer / direnv / bare / both) into a temp workspace via
    the real init-workspace.sh, git init it, and run actionlint over the
    rendered .github/workflows/ tree asserting exit 0 — plus the standalone
    smoke-test workflow template.
  • CHANGELOG: Added entry (the actionlint binary ships to consumers via
    the toolchain SSoT).

Hook-placement decision

Devkit-only, runner-only. The hook lives in the devkit's own
.pre-commit-config.yaml (not scaffolded to consumers, not in the flake sandbox
gate). It lints the devkit's own workflows only.

The per-mode consumer templates are not linted in-place by the hook and are
covered by the bats suite instead. This is forced, not just preferred: the
reusable release workflows reference ./.github/workflows/release-core.yml
(etc.), which actionlint resolves against the project root. Linting the
templates where they live (assets/workspace/.github/workflows/) resolves those
siblings against the devkit repo root — where those files do not exist —
producing false "reusable workflow not found" errors. Validating the rendered
tree (where the siblings sit together) is the faithful check, so that is what the
bats fixtures do. Consumers therefore get no actionlint hook; their rendered
workflows are guaranteed valid by the devkit's bats suite.

actionlint sweep triage

Ran actionlint over every target tree. Findings:

Class Where Count Disposition
shellcheck-in-run: (SC2086/2129/2016/2295/2207/2076/2015/2034 — all info/style/warning) devkit-own + all templates 41 Suppressed — -shellcheck= disables actionlint's bundled shellcheck. All are pre-existing info/style/warning noise in established run: blocks; the standalone shellcheck hook already covers .sh scripts. Hardening run: blocks + re-enabling is a deferred follow-up.
secrets.* "not defined in object type" assets/workspace release-core.yml, release-publish.yml 16 Suppressed in the bats sweep via -ignore (scoped to the exact inherited secret names). The caller passes them with secrets: inherit, which actionlint cannot see statically — a known false positive, not a defect.
workflow-call "could not read reusable workflow file" assets/workspace release.yml 3 False positive from out-of-tree linting (see decision above). Does not occur in the rendered tree, so no suppression needed — the bats fixtures pass cleanly.
genuine syntax/expression/wiring defects anywhere 0 None found. Nothing fixed, nothing deferred.

No workflows were rewritten. No .github/actionlint.yaml was added (the only
real false positive — inherited secrets — is scoped narrowly in the bats
invocation; a shipped config would belong with a future consumer-facing
actionlint hook, out of scope here).

CI wiring

No CI edit needed. The project-checks lane (.github/actions/test-project)
already runs prek run --all-files (covers the new hook) and bats tests/bats/
(covers the rendered-tree fixtures).

Evidence (local — the epic branch has no automated CI on sub-PRs)

Refs: #995

c-vigo added 4 commits July 13, 2026 09:36
Scaffold each delivery mode (devcontainer, direnv, bare, both) into a temp
workspace via the real init-workspace.sh and run actionlint over the rendered
.github/workflows/ tree, plus the standalone smoke-test workflow. RED until
actionlint lands in the toolchain.

Refs: #995
actionlint joins devTools (dev-shell, image, vigos.packages home module) so
GitHub Actions workflows can be linted from the toolchain SSoT.

Refs: #995
Devkit-only, runner-only: actionlint auto-discovers and lints this repo's own
.github/workflows/ with its bundled shellcheck disabled (-shellcheck=). The
per-mode rendered consumer templates are validated in tests/bats instead, since
linting them in-place resolves reusable-workflow siblings against the wrong
root. Defined once in nix/hooks.nix and rendered into .pre-commit-config.yaml.

Refs: #995
@c-vigo
c-vigo merged commit 89345d2 into feature/988-mode-aware-scaffold Jul 13, 2026
2 checks passed
@c-vigo
c-vigo deleted the feature/995-actionlint branch July 13, 2026 07:51
c-vigo added a commit that referenced this pull request Jul 13, 2026
…997)

One release choreography, mode-aware toolchain provisioning: resolve-toolchain + setup-devkit-toolchain composites (ADR Option A), single mode-aware ci.yml, all release/automation workflows container-free in direnv/bare, opt-in .devcontainer/ prune, vig-utils host-side, actionlint. Sub-PRs: #998 #999 #1000 #1001 #1002 #1005 #1006 #1007.

Refs: #988
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.

1 participant