From 322b1982103b8d79ca7d13f09e2e64f30967f4d2 Mon Sep 17 00:00:00 2001 From: Miss Bender Date: Tue, 5 May 2026 16:09:48 -0500 Subject: [PATCH] ci: add GitHub Actions workflow for shellcheck + bash -n + smoke tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit First CI for this repo. Mirrors the fleet pattern shipped this session (better-budget #41, stock-trainer #35, Better-legacy #36, bookmarks #27, save-for-later #38, flyck #61, better-bible-trivia #34, better-pastoral- care #27, tennis-story #76): ubuntu-latest runner, runs `bash -n` syntax check on every shell file, ShellCheck informationally (until issue #21's .shellcheckrc policy decision lands; otherwise the 234-finding baseline would block all PRs), and the existing tests/test_sandbox.sh smoke suite. Logs `shellcheck --version` + `bash --version` so future baseline drifts are visible (issue #21 was caused by an invisible shellcheck version bump). No CI existed prior to this commit — every change relied on local runs. --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 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..e0ac787 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + lint-and-test: + name: shellcheck + bash -n + smoke tests + runs-on: ubuntu-latest + timeout-minutes: 5 + + permissions: + contents: read + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Show shellcheck + bash version (for baseline reproducibility) + run: | + shellcheck --version + bash --version | head -1 + + - name: Bash syntax check + run: | + bash -n barista.sh + bash -n install.sh + for f in modules/*.sh tests/*.sh; do + [ -f "$f" ] && bash -n "$f" + done + + - name: ShellCheck (informational baseline ~234 findings, see issue #21) + run: | + # Issue #21 tracks the baseline drift between shellcheck versions. + # Until a project-wide .shellcheckrc policy is decided, this step + # is informational rather than a hard gate. Errors do NOT fail CI. + shellcheck barista.sh install.sh modules/*.sh -f gcc | tee shellcheck.log || true + echo "Total findings: $(wc -l < shellcheck.log)" + + - name: Smoke tests + run: bash tests/test_sandbox.sh