From 23e8a69e0e36389571ab6df97418399ff6053955 Mon Sep 17 00:00:00 2001 From: 0xLeif Date: Sun, 3 May 2026 09:28:59 -0600 Subject: [PATCH] ci: add CI workflow (shellcheck + --help smoke) Runs shellcheck and a `--help` smoke test on every shell binary in bin/. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b452da2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + shellcheck: + name: ShellCheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run shellcheck + run: | + shopt -s nullglob + fail=0 + for f in bin/*; do + if head -n1 "$f" | grep -qE '^#!.*\b(bash|sh)\b'; then + echo "▶ shellcheck $f" + shellcheck "$f" || fail=1 + fi + done + exit "$fail" + + smoke: + name: Smoke (--help) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run --help on every bin entry + run: | + shopt -s nullglob + for f in bin/*; do + if head -n1 "$f" | grep -qE '^#!.*\b(bash|sh)\b'; then + chmod +x "$f" + echo "▶ $f --help" + "$f" --help || exit 1 + echo + fi + done