From 066a670c547904c9f39f4bd04d2eed423937daca Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 6 Jul 2023 14:15:05 +0100 Subject: [PATCH] workflows: improve setup-homebrew usage. https://github.com/Homebrew/actions/pull/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 --- .github/workflows/actionlint.yml | 2 ++ .github/workflows/autobump.yml | 2 ++ .github/workflows/automerge.yml | 2 ++ .github/workflows/create-replacement-pr.yml | 2 ++ .github/workflows/dispatch-build-bottle.yml | 2 ++ .github/workflows/dispatch-rebottle.yml | 4 ++++ .github/workflows/publish-commit-bottles.yml | 2 ++ .github/workflows/remove-disabled-formulae.yml | 2 ++ .github/workflows/remove-long-timeout-labels.yml | 2 ++ .github/workflows/scheduled.yml | 6 +++++- .github/workflows/tests.yml | 14 +++++++++++++- 11 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.github/workflows/actionlint.yml b/.github/workflows/actionlint.yml index 95ae5013a11fa..83779b9526667 100644 --- a/.github/workflows/actionlint.yml +++ b/.github/workflows/actionlint.yml @@ -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 diff --git a/.github/workflows/autobump.yml b/.github/workflows/autobump.yml index 180611ee83dbc..989dbbf9b813c 100644 --- a/.github/workflows/autobump.yml +++ b/.github/workflows/autobump.yml @@ -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 diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 4e048ab992c4e..89a8d5feaf695 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -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" diff --git a/.github/workflows/create-replacement-pr.yml b/.github/workflows/create-replacement-pr.yml index 5bf851e503f45..881d17ac26640 100644 --- a/.github/workflows/create-replacement-pr.yml +++ b/.github/workflows/create-replacement-pr.yml @@ -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 diff --git a/.github/workflows/dispatch-build-bottle.yml b/.github/workflows/dispatch-build-bottle.yml index b4892b74b18ad..071f385fb5d76 100644 --- a/.github/workflows/dispatch-build-bottle.yml +++ b/.github/workflows/dispatch-build-bottle.yml @@ -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 diff --git a/.github/workflows/dispatch-rebottle.yml b/.github/workflows/dispatch-rebottle.yml index 93d95634d286e..e4b342f4bcee1 100644 --- a/.github/workflows/dispatch-rebottle.yml +++ b/.github/workflows/dispatch-rebottle.yml @@ -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 @@ -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 diff --git a/.github/workflows/publish-commit-bottles.yml b/.github/workflows/publish-commit-bottles.yml index 1ac155b35ef28..2c613f2dd56e8 100644 --- a/.github/workflows/publish-commit-bottles.yml +++ b/.github/workflows/publish-commit-bottles.yml @@ -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 diff --git a/.github/workflows/remove-disabled-formulae.yml b/.github/workflows/remove-disabled-formulae.yml index 557bd24132238..8482f0fb3b84c 100644 --- a/.github/workflows/remove-disabled-formulae.yml +++ b/.github/workflows/remove-disabled-formulae.yml @@ -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 diff --git a/.github/workflows/remove-long-timeout-labels.yml b/.github/workflows/remove-long-timeout-labels.yml index 01bea282350f3..8f28c15082bd7 100644 --- a/.github/workflows/remove-long-timeout-labels.yml +++ b/.github/workflows/remove-long-timeout-labels.yml @@ -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 diff --git a/.github/workflows/scheduled.yml b/.github/workflows/scheduled.yml index 4e9e48a5d1907..08590671cc6c0 100644 --- a/.github/workflows/scheduled.yml +++ b/.github/workflows/scheduled.yml @@ -27,6 +27,8 @@ jobs: id: set-up-homebrew uses: Homebrew/actions/setup-homebrew@master with: + core: true + cask: false test-bot: false - id: matrix @@ -34,7 +36,7 @@ jobs: 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" @@ -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. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8d49d29828469..7aa4bb6b94dea 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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))) &&