From 10e7d8ee326953843554f5410b84a1170253eefe Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:44:17 +0800 Subject: [PATCH 1/2] Revert "Revert "workflows/tests: using testing formulae from `determine-test-runners`"" --- .github/workflows/scripts/check-labels.js | 2 -- .github/workflows/tests.yml | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/scripts/check-labels.js b/.github/workflows/scripts/check-labels.js index 6436586273f5..ccf3b5faa43f 100644 --- a/.github/workflows/scripts/check-labels.js +++ b/.github/workflows/scripts/check-labels.js @@ -70,12 +70,10 @@ module.exports = async ({github, context, core}, formulae_detect, dependent_test } const test_bot_formulae_args = ["--only-formulae", "--junit", "--only-json-tab", "--skip-dependents"] - test_bot_formulae_args.push(`--testing-formulae="${formulae_detect.testing_formulae}"`) test_bot_formulae_args.push(`--added-formulae="${formulae_detect.added_formulae}"`) test_bot_formulae_args.push(`--deleted-formulae="${formulae_detect.deleted_formulae}"`) const test_bot_dependents_args = ["--only-formulae-dependents", "--junit"] - test_bot_dependents_args.push(`--testing-formulae="${formulae_detect.testing_formulae}"`) if (label_names.includes(`CI-test-bot-fail-fast${deps_suffix}`)) { console.log(`CI-test-bot-fail-fast${deps_suffix} label found. Passing --fail-fast to brew test-bot.`) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8aa685d75bf3..ebe62ab15ca2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -218,6 +218,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} HOMEBREW_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} BOTTLES_DIR: ${{matrix.workdir || github.workspace}}/bottles + TESTING_FORMULAE: ${{matrix.testing_formulae}} steps: - name: Pre-test steps uses: Homebrew/actions/pre-build@master @@ -225,7 +226,7 @@ jobs: bottles-directory: ${{ env.BOTTLES_DIR }} cleanup: ${{ matrix.cleanup }} - - run: brew test-bot ${{ needs.setup_tests.outputs.test-bot-formulae-args }} + - run: brew test-bot ${{ needs.setup_tests.outputs.test-bot-formulae-args }} --testing-formulae="$TESTING_FORMULAE" id: brew-test-bot-formulae working-directory: ${{ env.BOTTLES_DIR }} @@ -337,6 +338,7 @@ jobs: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} HOMEBREW_GITHUB_API_TOKEN: ${{secrets.GITHUB_TOKEN}} BOTTLES_DIR: ${{matrix.workdir || github.workspace}}/bottles + TESTING_FORMULAE: ${{matrix.testing_formulae}} steps: - name: Pre-test steps uses: Homebrew/actions/pre-build@master @@ -345,7 +347,7 @@ jobs: cleanup: ${{ matrix.cleanup }} download-bottles: true - - run: brew test-bot ${{ needs.setup_dep_tests.outputs.test-bot-dependents-args }} + - run: brew test-bot ${{ needs.setup_dep_tests.outputs.test-bot-dependents-args }} --testing-formulae="$TESTING_FORMULAE" working-directory: ${{ env.BOTTLES_DIR }} - name: Steps summary and cleanup From eef391a60fdef8bf9f5119ff4b19628d0e320b8c Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sun, 8 Sep 2024 16:47:16 +0800 Subject: [PATCH 2/2] check-labels.js: use `--tested-formulae` flag Needs Homebrew/homebrew-test-bot#1202. --- .github/workflows/scripts/check-labels.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/scripts/check-labels.js b/.github/workflows/scripts/check-labels.js index ccf3b5faa43f..7890328035b4 100644 --- a/.github/workflows/scripts/check-labels.js +++ b/.github/workflows/scripts/check-labels.js @@ -74,6 +74,7 @@ module.exports = async ({github, context, core}, formulae_detect, dependent_test test_bot_formulae_args.push(`--deleted-formulae="${formulae_detect.deleted_formulae}"`) const test_bot_dependents_args = ["--only-formulae-dependents", "--junit"] + test_bot_dependents_args.push(`--tested-formulae="${formulae_detect.testing_formulae}"`) if (label_names.includes(`CI-test-bot-fail-fast${deps_suffix}`)) { console.log(`CI-test-bot-fail-fast${deps_suffix} label found. Passing --fail-fast to brew test-bot.`)