diff --git a/.github/workflows/ci-dispatch.yml b/.github/workflows/ci-dispatch.yml index 077b8cf5e..6dfaa5fdf 100644 --- a/.github/workflows/ci-dispatch.yml +++ b/.github/workflows/ci-dispatch.yml @@ -22,18 +22,18 @@ jobs: echo channels=$(python3 choose_test_channel.py) >> "$GITHUB_OUTPUT" - Run-Smoke-Win: + Run-Starfox-Win: needs: Select-Channels - if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'smoke') + if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'starfox') uses: ./.github/workflows/main.yml with: job_to_run: Test-Windows is_pull_request: true secrets: inherit - Run-Smoke-Mac: + Run-Starfox-Mac: needs: Select-Channels - if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'smoke') + if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'starfox') uses: ./.github/workflows/main.yml with: job_to_run: Test-MacOS diff --git a/choose_test_channel.py b/choose_test_channel.py index 705a5859f..713b49583 100644 --- a/choose_test_channel.py +++ b/choose_test_channel.py @@ -3,12 +3,12 @@ import sys from subprocess import check_output -ALL_CHANNELS = ["smoke", "l10n", "functional"] +ALL_CHANNELS = ["starfox", "l10n"] SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) SLASH = "/" if "/" in SCRIPT_DIR else "\\" file_subsets = { - "smoke": ["modules/data", "modules/page", "modules/browser", "tests/"], + "starfox": ["modules/data", "modules/page", "modules/browser", "tests/"], "l10n": ["l10n_CM/"], } @@ -44,7 +44,7 @@ main_conftest = "conftest.py" base_page = os.path.join("modules", "page_base.py") -channels = [] +channels = set() if main_conftest in committed_files or base_page in committed_files: print(ALL_CHANNELS) @@ -55,11 +55,11 @@ print(ALL_CHANNELS) sys.exit() - for test_channel in file_subsets: - for subset in file_subsets[test_channel]: - if subset in f and test_channel not in channels: - channels.append(test_channel) + for test_channel, subset in file_subsets.items(): + if any(s in c for s in subset for c in committed_files): + channels.add(test_channel) if not channels: - channels = ["smoke"] -print(channels) + channels = {"starfox"} + +print(list(channels))