Skip to content

Commit 42aaa3f

Browse files
committed
workflows: fix quoting of formula names
The double quoting of formula names is broken after #201306. Let's fix it by moving out the double-quoted formula names to a separate variable. Should fix the failure seen in [1]. [1]: https://github.com/Homebrew/homebrew-core/actions/runs/12345589565/job/34449970508?pr=201322
1 parent 36aa948 commit 42aaa3f

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

.github/workflows/scripts/check-labels.js

-5
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,7 @@ module.exports = async ({github, context, core}, formulae_detect, dependent_test
7070
}
7171

7272
const test_bot_formulae_args = ["--only-formulae", "--junit", "--only-json-tab", "--skip-dependents"]
73-
test_bot_formulae_args.push(`--testing-formulae="${formulae_detect.testing_formulae}"`)
74-
test_bot_formulae_args.push(`--added-formulae="${formulae_detect.added_formulae}"`)
75-
test_bot_formulae_args.push(`--deleted-formulae="${formulae_detect.deleted_formulae}"`)
76-
7773
const test_bot_dependents_args = ["--only-formulae-dependents", "--junit"]
78-
test_bot_dependents_args.push(`--tested-formulae="${formulae_detect.testing_formulae}"`)
7974

8075
if (label_names.includes(`CI-test-bot-fail-fast${deps_suffix}`)) {
8176
console.log(`CI-test-bot-fail-fast${deps_suffix} label found. Passing --fail-fast to brew test-bot.`)

.github/workflows/tests.yml

+13-4
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ jobs:
204204
run: brew determine-test-runners "$TESTING_FORMULAE" "$DELETED_FORMULAE"
205205

206206
tests:
207-
needs: [tap_syntax, setup_tests, setup_runners]
207+
needs: [tap_syntax, formulae_detect, setup_tests, setup_runners]
208208
if: >
209209
github.event_name == 'pull_request' &&
210210
!fromJson(needs.setup_tests.outputs.syntax-only) &&
@@ -235,9 +235,15 @@ jobs:
235235
- id: brew-test-bot-formulae
236236
run: |
237237
# shellcheck disable=SC2086
238-
brew test-bot $TEST_BOT_FORMULAE_ARGS
238+
brew test-bot $TEST_BOT_FORMULAE_ARGS \
239+
--testing-formulae="$TESTING_FORMULAE" \
240+
--added-formulae="$ADDED_FORMULAE" \
241+
--deleted-formulae="$DELETED_FORMULAE"
239242
env:
240243
TEST_BOT_FORMULAE_ARGS: ${{ needs.setup_tests.outputs.test-bot-formulae-args }}
244+
TESTING_FORMULAE: ${{ needs.formulae_detect.outputs.testing_formulae }}
245+
ADDED_FORMULAE: ${{ needs.formulae_detect.outputs.added_formulae }}
246+
DELETED_FORMULAE: ${{ needs.formulae_detect.outputs.deleted_formulae }}
241247
working-directory: ${{ env.BOTTLES_DIR }}
242248

243249
- name: Post-build steps
@@ -324,7 +330,7 @@ jobs:
324330
run: brew determine-test-runners --dependents --eval-all "$TESTING_FORMULAE"
325331

326332
test_deps:
327-
needs: [tap_syntax, setup_dep_tests, setup_dep_runners, tests]
333+
needs: [tap_syntax, formulae_detect, setup_dep_tests, setup_dep_runners, tests]
328334
if: >
329335
(success() ||
330336
(failure() &&
@@ -361,9 +367,12 @@ jobs:
361367

362368
- run: |
363369
# shellcheck disable=SC2086
364-
brew test-bot $TEST_BOT_DEPENDENTS_ARGS --testing-formulae="$TESTING_FORMULAE"
370+
brew test-bot $TEST_BOT_DEPENDENTS_ARGS \
371+
--testing-formulae="$TESTING_FORMULAE" \
372+
--tested-formulae="$TESTED_FORMULAE"
365373
env:
366374
TEST_BOT_DEPENDENTS_ARGS: ${{ needs.setup_dep_tests.outputs.test-bot-dependents-args }}
375+
TESTED_FORMULAE: ${{ needs.formulae_detect.outputs.testing_formulae }}
367376
working-directory: ${{ env.BOTTLES_DIR }}
368377
369378
- name: Steps summary and cleanup

0 commit comments

Comments
 (0)