Skip to content

test(): add bats tests and shellcheck, run on pull requests - #14

Merged
piyook merged 2 commits into
devfrom
test/bats-and-shellcheck
Oct 9, 2026
Merged

piyook merged 2 commits into
devfrom
test/bats-and-shellcheck

Conversation

@piyook

@piyook piyook commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Adds an automated test suite for gitrid.sh and runs it in CI.

  • tests/gitrid.bats: 35 bats tests. They build a throwaway repo (a bare remote and a working clone) with merged, unmerged, never-pushed and upstream-gone branches, then check what each option lists, what it deletes and the exit codes (0, 1, 2, 3). Also checks that llms.txt names the same version as the script.
  • .github/workflows/tests.yml: runs the tests on Ubuntu and macOS, and ShellCheck on the shell scripts, on every pull request and on pushes to main.
  • setup_gitbash.sh: quotes the cp arguments (the one ShellCheck finding).
  • README.md: a short Tests section.

Run locally with npx bats tests.

The suite passes locally on Windows Git Bash. The macOS job has not been run before this PR.

🤖 Generated with Claude Code

piyook and others added 2 commits October 9, 2026 10:47
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…checkout

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@piyook
piyook merged commit 00f157c into dev Oct 9, 2026
3 checks passed
@piyook
piyook deleted the test/bats-and-shellcheck branch October 9, 2026 09:52
@piyook piyook mentioned this pull request Oct 9, 2026
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