Skip to content

Commit

Permalink
workflows: improve setup-homebrew usage.
Browse files Browse the repository at this point in the history
Homebrew/actions#393 will change the default
behaviour of setup-homebrew so let's be explicit to speed things up and
avoid changes when it's merged
  • Loading branch information
MikeMcQuaid committed Jul 6, 2023
1 parent 20dd59f commit 066a670
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
id: setup-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Set up actionlint
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/autobump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Configure Git user
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ jobs:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- run: brew pr-publish "$PR"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/create-replacement-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Get reviewers
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/dispatch-build-bottle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Download bottles from GitHub Actions
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dispatch-rebottle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Determine runners
Expand Down Expand Up @@ -125,6 +127,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Download bottles from GitHub Actions
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/publish-commit-bottles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Configure Git user
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/remove-disabled-formulae.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Configure Git user
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/remove-long-timeout-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ jobs:
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: false
cask: false
test-bot: false

- name: Check CI status
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- id: matrix
run: |
formula="$(find "$(brew --repo "${TAP}")/Formula" | shuf -n "${TEST_COUNT}" | xargs -I{} basename {} .rb)"
# shellcheck disable=SC2086
json="$(
brew info --json=v2 $formula |
brew info --json=v2 $formula |
jq --compact-output '[.formulae[] | select(.deprecated == false and .disabled == false) | .name]'
)"
echo "json=${json}" >> "$GITHUB_OUTPUT"
Expand All @@ -57,6 +59,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Check formula for missing upstreams etc.
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: true

- name: Cache style cache
uses: actions/cache@v3
Expand All @@ -59,6 +63,10 @@ jobs:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: true

- run: brew test-bot --only-formulae-detect
id: formulae-detect
Expand Down Expand Up @@ -136,6 +144,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Determine runners to use for tests job
Expand Down Expand Up @@ -299,6 +309,8 @@ jobs:
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
core: true
cask: false
test-bot: false

- name: Determine runners to use for test_deps job
Expand All @@ -308,7 +320,7 @@ jobs:
test_deps:
needs: [tap_syntax, setup_dep_tests, setup_dep_runners, tests]
if: >
(success() ||
(success() ||
(failure() &&
!fromJson(needs.setup_dep_tests.outputs.fail-fast) &&
!contains(fromJson('["skipped", "cancelled"]'), needs.tests.result))) &&
Expand Down

0 comments on commit 066a670

Please sign in to comment.