Skip to content

Commit 98b1e8b

Browse files
revised the channel addition, logic untouched (#950)
* revised the channel addition, logic untouched * replaced smoke with starfox
1 parent aeefec9 commit 98b1e8b

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

.github/workflows/ci-dispatch.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ jobs:
2222
echo channels=$(python3 choose_test_channel.py) >> "$GITHUB_OUTPUT"
2323
2424
25-
Run-Smoke-Win:
25+
Run-Starfox-Win:
2626
needs: Select-Channels
27-
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'smoke')
27+
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'starfox')
2828
uses: ./.github/workflows/main.yml
2929
with:
3030
job_to_run: Test-Windows
3131
is_pull_request: true
3232
secrets: inherit
3333

34-
Run-Smoke-Mac:
34+
Run-Starfox-Mac:
3535
needs: Select-Channels
36-
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'smoke')
36+
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'starfox')
3737
uses: ./.github/workflows/main.yml
3838
with:
3939
job_to_run: Test-MacOS

choose_test_channel.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import sys
44
from subprocess import check_output
55

6-
ALL_CHANNELS = ["smoke", "l10n", "functional"]
6+
ALL_CHANNELS = ["starfox", "l10n"]
77
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
88
SLASH = "/" if "/" in SCRIPT_DIR else "\\"
99

1010
file_subsets = {
11-
"smoke": ["modules/data", "modules/page", "modules/browser", "tests/"],
11+
"starfox": ["modules/data", "modules/page", "modules/browser", "tests/"],
1212
"l10n": ["l10n_CM/"],
1313
}
1414

@@ -44,7 +44,7 @@
4444
main_conftest = "conftest.py"
4545
base_page = os.path.join("modules", "page_base.py")
4646

47-
channels = []
47+
channels = set()
4848

4949
if main_conftest in committed_files or base_page in committed_files:
5050
print(ALL_CHANNELS)
@@ -55,11 +55,11 @@
5555
print(ALL_CHANNELS)
5656
sys.exit()
5757

58-
for test_channel in file_subsets:
59-
for subset in file_subsets[test_channel]:
60-
if subset in f and test_channel not in channels:
61-
channels.append(test_channel)
58+
for test_channel, subset in file_subsets.items():
59+
if any(s in c for s in subset for c in committed_files):
60+
channels.add(test_channel)
6261

6362
if not channels:
64-
channels = ["smoke"]
65-
print(channels)
63+
channels = {"starfox"}
64+
65+
print(list(channels))

0 commit comments

Comments
 (0)