Skip to content

ci: add lint + syntax + install-smoke workflow#5

Merged
ashbrener merged 1 commit into
mainfrom
chore/wingman-ci
Apr 28, 2026
Merged

ci: add lint + syntax + install-smoke workflow#5
ashbrener merged 1 commit into
mainfrom
chore/wingman-ci

Conversation

@ashbrener

@ashbrener ashbrener commented Apr 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds .github/workflows/wingman-ci.yml with three parallel jobs: lint (shellcheck), syntax (bash -n + py_compile on the embedded heredoc), and install-smoke (fresh / v1→v2 upgrade / --force scenarios against an ephemeral git repo).
  • Triggers on pull_request and workflow_dispatch only — push to main is wasteful for a skill pack.
  • Locks in the three install paths from PR fix(pre-push): env-overflow on big pushes #4 so they don't drift silently; the smoke job uses SHA 4b38606 to source the v1 sample for the upgrade scenario, so the fixture stays stable as main advances.

CI status on first run

The CI workflow itself is correct — leaving it red here is intentional so the bug is visible. Once the mktemp fix lands, this CI goes green.

Pre-existing shellcheck signal (not blocking lint job)

The lint job runs at --severity=error and is green. At --severity=warning, scripts/install.sh surfaces 3 stylistic items, all PR #4 territory:

  • SC2034 END_MARKER appears unused (line 60)
  • SC2126 grep | wc -lgrep -c (line 149)
  • SC2129 individual redirects → { ...; } >> (line 171)

Not addressed here per scope.

Test plan

  • CI workflow runs on this PR
  • All three jobs green (currently install-smoke is red on the mktemp portability bug — fix in follow-up)
  • After merge, register lint/syntax/install-smoke as required status checks if you want gating (currently no branch protection — informational until added)

ashbrener added a commit that referenced this pull request Apr 28, 2026
PR #5's install-smoke job (Linux runner) caught two `mktemp -t name`
invocations that fail on GNU mktemp (`too few X's in template`).
Linux/WSL contributors would have hit this immediately. Both fixed
to `mktemp -t name.XXXXXX` — portable across BSD (macOS) and GNU.

Also clears 3 pre-existing shellcheck warnings PR #5's lint job
surfaced in scripts/install.sh:
- SC2034: unused END_MARKER
- SC2126: grep|wc -l → grep -c
- SC2129: grouped redirects with { ... } >> file

No version bump (still wingman-hook-version: 2 — bugfixes within v2).
Wingman ships bash + inline python; the install.sh has versioned-block
logic and three install paths (fresh / upgrade / --force). Without CI
those paths drift silently — the next PR that breaks `npx skills add
ashbrener/wingman` ships unnoticed.

Three jobs:
- lint: shellcheck on install.sh + pre-push.sample
- syntax: bash -n + py_compile on the embedded heredoc
- install-smoke: exercise fresh / upgrade / --force scenarios
  against an ephemeral git repo

Triggers: pull_request + workflow_dispatch (skip push for skill packs).
@ashbrener ashbrener marked this pull request as ready for review April 28, 2026 20:03
@ashbrener ashbrener merged commit 29e9ffd into main Apr 28, 2026
3 checks passed
ashbrener added a commit that referenced this pull request Apr 28, 2026
Catch up the README with PR #4 (versioned-block installer + --force
reinstall flag) and PR #5 (CI workflow). Documents:
- The hook-version marker pattern (# wingman-hook-version: N)
- --force / --reinstall flag for unconditional block replacement
- --help flag for installer usage
- .github/workflows/wingman-ci.yml runs lint + syntax + install-smoke
  on every PR (validates macOS + Linux compatibility)

No code changes; pure docs catch-up.
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