fix(ci): install chezmoi in bash tests workflow job#129
Conversation
The bash-tests job in .github/workflows/test.yml has been failing on every push since the bats suite started invoking `chezmoi execute-template` indirectly through per-test _render() helpers (see tests/bash/signing-resolve.bats:20-26 and tests/bash/secret-deploy-manifest.bats:20-26). The ubuntu-latest runner does not preinstall chezmoi, so each _render call exits 127 and the suite reports environmental rather than behavioral failures. Add two steps after the checkout that install chezmoi into $HOME/.local/bin via the official one-shot installer and append that directory to $GITHUB_PATH so `Run bats tests` can resolve chezmoi on PATH. This matches the smallest-change recommendation in #109 and keeps the workflow free of any tool-version pin (tracked separately if a reviewer wants mise to pin chezmoi). After this PR lands and master CI confirms a green Bash tests (bats) run, the matching check should be promoted to a required status check on the master branch protection by appending it to `required_status_checks.contexts`. Closes #109 Refs #107 fix(ci): install chezmoi in bash tests workflow job The bash-tests job in .github/workflows/test.yml has been failing on every push since the bats suite started invoking `chezmoi execute-template` indirectly through per-test _render() helpers (see tests/bash/signing-resolve.bats:20-26 and tests/bash/secret-deploy-manifest.bats:20-26). The ubuntu-latest runner does not preinstall chezmoi, so each _render call exits 127 and the suite reports environmental rather than behavioral failures. Add two steps after the checkout that install chezmoi into $HOME/.local/bin via the official one-shot installer and append that directory to $GITHUB_PATH so `Run bats tests` can resolve chezmoi on PATH. This matches the smallest-change recommendation in #109 and keeps the workflow free of any tool-version pin (tracked separately if a reviewer wants mise to pin chezmoi). After this PR lands and master CI confirms a green Bash tests (bats) run, the matching check should be promoted to a required status check on the master branch protection by appending it to `required_status_checks.contexts`. Closes #109 Refs #107
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes the Bash CI test environment by installing chezmoi before running the bats suite, aligning the workflow with tests that render chezmoi templates.
Changes:
- Installs
chezmoiin thebash-testsjob. - Adds
$HOME/.local/bintoPATHfor subsequent CI steps.
Two follow-up fixes on the bash CI job after the first chezmoi install attempt: - tests/bash/75-worktrunk.bats:149,158,167 invoke `zsh -fc` to exercise the WorkTrunk shell-init renderer. The ubuntu-latest runner does not preinstall zsh, so each invocation exited 127 even after the chezmoi step landed. Install zsh alongside chezmoi in the same step. - cspell flagged `luac` (the Lua bytecode compiler used by the lua-syntax job at line 55 of the same workflow file). cspell-action scans changed files in full, so the pre-existing word came into scope once test.yml was touched. Add `luac` to .cspell.config.yml#words. After these land, the PR's Bash tests (bats) and lint checks both go green, which is the precondition for promoting Bash tests (bats) to a required status check on master. Refs #109 fix(ci): also install zsh; extend cspell dictionary for luac Two follow-up fixes on the bash CI job after the first chezmoi install attempt: - tests/bash/75-worktrunk.bats:149,158,167 invoke `zsh -fc` to exercise the WorkTrunk shell-init renderer. The ubuntu-latest runner does not preinstall zsh, so each invocation exited 127 even after the chezmoi step landed. Install zsh alongside chezmoi in the same step. - cspell flagged `luac` (the Lua bytecode compiler used by the lua-syntax job at line 55 of the same workflow file). cspell-action scans changed files in full, so the pre-existing word came into scope once test.yml was touched. Add `luac` to .cspell.config.yml#words. After these land, the PR's Bash tests (bats) and lint checks both go green, which is the precondition for promoting Bash tests (bats) to a required status check on master. Refs #109
Summary
.github/workflows/test.yml'sbash-testsjob: installchezmoiinto$HOME/.local/binvia the official one-shot installer, then append that directory to$GITHUB_PATHsoRun bats testsresolves the binary onPATH.chezmoi execute-templateindirectly via per-test_render()helpers (tests/bash/signing-resolve.bats:20-26,tests/bash/secret-deploy-manifest.bats:20-26). The ubuntu-latest runner did not preinstall chezmoi, so each_rendercall exited 127 and the failures were environmental, not behavioral. After this fix the suite should run end to end.master'sBash tests (bats)check is green, appendBash tests (bats)torequired_status_checks.contextsviagh api PUT branches/master/protection. This is a settings-only update and can be done by the same session that watches the post-merge run.Closes #109
Refs #107
Test plan
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/test.yml'))"parses cleanly.tests/bash/helpers/bats-core/bin/bats tests/bash/→ 212 / 212 pass locally (wherechezmoiis already onPATHvia Homebrew).Bash tests (bats)should now complete green. This is the empirical verification the issue acceptance criteria require.Bash tests (bats)to required checks. Will be applied by the same agent session that watches the post-mergemasterrun.Signing trail
Commit signed via
git commit-sshalias (SSH fallback path; GPG remained in category-P pinentry timeout state).🤖 Generated with Claude Code