Skip to content

ci: add presubmit GitHub Actions workflow - #33

Merged
shrey-endor merged 3 commits into
mainfrom
jsanders/github-actions
Aug 6, 2026
Merged

ci: add presubmit GitHub Actions workflow#33
shrey-endor merged 3 commits into
mainfrom
jsanders/github-actions

Conversation

@dekkagaijin

Copy link
Copy Markdown
Contributor

Summary

Adds a presubmit CI workflow (.github/workflows/ci.yml) that runs on every pull request and on pushes to main:

  • Lint bashshellcheck --severity=warning on all hand-written scripts (generator, lib, templates, agent-governance), plus bash -n on everything including the generated examples under out/ (excluded from full shellcheck because they intentionally define config blocks not every script consumes).
  • Lint PowerShell — parser check on every .ps1 (including {{TOKEN}} templates and generated output), plus PSScriptAnalyzer on hand-written scripts gating on Error severity (warnings printed, non-blocking).
  • Validate data filesjq for JSON, tomllib for TOML, xmllint for the .mobileconfig plists.
  • Lint workflows — actionlint (which also shellchecks the workflow's own run blocks).
  • Generator smoke test — runs both package-firewall generators end-to-end with dummy credentials and syntax/parse-checks all 6 generated scripts per platform.
  • Tests — runs package-firewall/tests/run-all.sh on ubuntu + macos and run-all.ps1 on windows. The tests directory is on an unmerged branch, so these jobs log a skip notice until it lands, then activate automatically.

Also fixes the single pre-existing shellcheck finding (SC1007 in agent-governance/scripts/render.sh: CDPATH= cdCDPATH='' cd, equivalent) so the lint gate starts green.

All jobs were run locally before pushing: shellcheck/bash -n/actionlint clean, all .ps1 parse, PSScriptAnalyzer 0 errors (137 non-blocking warnings, mostly PSAvoidUsingWriteHost), JSON/TOML/mobileconfig valid, both generator smoke tests pass.

Lints bash (shellcheck + bash -n), PowerShell (parser + PSScriptAnalyzer),
and data files (JSON/TOML/mobileconfig), lints the workflows themselves
with actionlint, smoke-tests both package-firewall generators with dummy
credentials, and runs the package-firewall test suites on ubuntu/macos/
windows once package-firewall/tests/ lands on a branch.

Also fixes the one shellcheck finding (SC1007 in render.sh) so the
lint gate starts green.
@endor-labs-pro

endor-labs-pro Bot commented Aug 5, 2026

Copy link
Copy Markdown

Note

Great work! All the policy violations detected earlier were successfully resolved.

@dekkagaijin
dekkagaijin requested a review from shrey-endor August 5, 2026 19:08
@shrey-endor
shrey-endor merged commit 8fe1b3f into main Aug 6, 2026
9 checks passed
@shrey-endor
shrey-endor deleted the jsanders/github-actions branch August 6, 2026 04:11
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