Add CI to test formula installs#14
Merged
Merged
Conversation
Adds a test-formula workflow that runs on PRs touching Formula/*.rb: audits, installs from source, and tests each formula across Ubuntu and macOS. Once all matrix jobs pass, a follow-up job flips draft PRs to ready-for-review. Switches update-formula.yml to open its bump PRs as drafts so the new test workflow gates them before merge.
In 0.7.0, 'denvig zsh completions' rejects extra arguments. The default generate_completions_from_executable iterates over bash/zsh/fish and appends the shell name, producing 'denvig zsh completions bash' which errors. Pin shells to zsh only and use shell_parameter_format :none so the command runs as 'denvig zsh completions'.
Matches the denvig-alpha formula. Previously the default behavior ran 'denvig zsh completions <shell>' for bash/zsh/fish; the extra argument was silently ignored in 0.6.7 but will fail on future versions.
marcqualie
added a commit
that referenced
this pull request
Jun 3, 2026
## Problem The `test-formula` workflow never ran on PR #17 (or #15) — confirmed via the API: `0` check runs on #17's head SHA. `test-formula` has only ever run on the branch where it was introduced (#14). As a result, a broken install merged with **no CI**. The path filter is fine (#17 edits `Formula/denvig-alpha.rb`). The real cause: The `Update Formula` workflow opens its PRs using the default `GITHUB_TOKEN`: ```yaml env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` > When you use the repository's `GITHUB_TOKEN`, events triggered by the `GITHUB_TOKEN` **will not create a new workflow run.** This prevents accidental recursive runs. So the `pull_request` event for the update PR is suppressed and `test-formula` never triggers. ## Fix Open the PR (and push the branch) with a **fine-grained PAT** stored as the `FORMULA_UPDATE_TOKEN` secret, so the `pull_request` event fires and `test-formula` runs before merge. ## Required setup (repo admin) 1. Create a **fine-grained PAT** scoped to `denvig/homebrew-tap` with: - **Contents:** Read and write - **Pull requests:** Read and write 2. Add it as a repository **Actions secret** named `FORMULA_UPDATE_TOKEN`. Without the secret, the `Update Formula` workflow will fail at checkout — so add it before the next run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.github/workflows/test-formula.ymlthat runs on PRs touchingFormula/*.rb. Matrix overmacos-latest/ubuntu-latest×denvig/denvig-alpha, executingbrew audit --strict,brew install --build-from-source, andbrew testagainst each formula by name (relying on the auto-tap thatHomebrew/actions/setup-homebrewperforms in tap repos).update-formula.ymlto open its version-bump PRs as--draftso the new test workflow gates them before merge. PRs are promoted to ready-for-review manually after review.shell_parameter_format: :none, so the executable is invoked asdenvig zsh completions(the previous default invoked it asdenvig zsh completions <shell>, which 0.6.7 silently ignored but 0.7.0-alpha rejects).Test plan
Test Formulaworkflow runs on this PR and passes for bothdenviganddenvig-alphaon macOS.Update Formuladispatch opens its PR as a draft, gated by the test workflow.