Skip to content

Commit 4022207

Browse files
committed
Merge branch 'main' into review-github-parameters
2 parents 017ea85 + cf9f91a commit 4022207

File tree

150 files changed

+5356
-651
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+5356
-651
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Check new beta version - Functional
2+
3+
on:
4+
schedule:
5+
- cron: "55 1/5 1 * *"
6+
env:
7+
LATEST: ""
8+
permissions:
9+
contents: "write"
10+
11+
jobs:
12+
Check-Beta-Version:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
win_reportable: ${{ steps.reportable.outputs.win }}
16+
mac_reportable: ${{ steps.reportable.outputs.mac }}
17+
mac_l10n_reportable: ${{ steps.l10n-reportable.outputs.mac_l10n }}
18+
win_l10n_reportable: ${{ steps.l10n-reportable.outputs.win_l10n }}
19+
linux_l10n_reportable: ${{ steps.l10n-reportable.outputs.linux_l10n }}
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
- name: Check if the run is reportable
24+
id: reportable
25+
env:
26+
STARFOX_SPLIT: functional1
27+
TESTRAIL_REPORT: true
28+
TESTRAIL_BASE_URL: ${{ secrets.TESTRAIL_BASE_URL }}
29+
TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}
30+
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
31+
run: |
32+
pip3 install 'pipenv==2023.11.15';
33+
pipenv install
34+
echo win=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable("Windows"))') >> "$GITHUB_OUTPUT"
35+
echo mac=$(pipenv run python -c 'from modules import testrail_integration as tri; print(tri.reportable("Darwin"))') >> "$GITHUB_OUTPUT"
36+
37+
Run-Win-Functional:
38+
needs: Check-Beta-Version
39+
if: ${{ needs.Check-Beta-Version.outputs.win_reportable == 'True' }}
40+
uses: ./.github/workflows/main.yml
41+
with:
42+
job_to_run: Test-Windows
43+
test_set: functional
44+
secrets: inherit
45+
46+
Run-Mac-Functional:
47+
needs: Check-Beta-Version
48+
if: ${{ needs.Check-Beta-Version.outputs.mac_reportable == 'True' }}
49+
uses: ./.github/workflows/main.yml
50+
with:
51+
job_to_run: Test-MacOS
52+
test_set: functional
53+
secrets: inherit

.github/workflows/check-beta-l10n.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check new beta version - L10N
22

33
on:
44
schedule:
5-
- cron: "21 */1 * * *"
5+
- cron: "21 */2 * * *"
66
env:
77
LATEST: ""
88
permissions:

.github/workflows/check-beta.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Check new beta version - Smoke
22

33
on:
44
schedule:
5-
- cron: "40 */1 * * *"
5+
- cron: "20 */1 * * *"
66
env:
77
LATEST: ""
88
permissions:
@@ -27,6 +27,7 @@ jobs:
2727
TESTRAIL_BASE_URL: ${{ secrets.TESTRAIL_BASE_URL }}
2828
TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}
2929
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
30+
STARFOX_SPLIT: smoke
3031
run: |
3132
pip3 install 'pipenv==2023.11.15';
3233
pipenv install
@@ -36,15 +37,17 @@ jobs:
3637
Run-Win-Smoke:
3738
needs: Check-Beta-Version
3839
if: ${{ needs.Check-Beta-Version.outputs.win_reportable == 'True' }}
39-
uses: ./.github/workflows/smoke.yml
40+
uses: ./.github/workflows/main.yml
4041
with:
41-
job_to_run: Smoke-Windows
42+
job_to_run: Test-Windows
43+
test_set: smoke
4244
secrets: inherit
4345

4446
Run-Mac-Smoke:
4547
needs: Check-Beta-Version
4648
if: ${{ needs.Check-Beta-Version.outputs.mac_reportable == 'True' }}
47-
uses: ./.github/workflows/smoke.yml
49+
uses: ./.github/workflows/main.yml
4850
with:
49-
job_to_run: Smoke-MacOS
51+
job_to_run: Test-MacOS
52+
test_set: smoke
5053
secrets: inherit

.github/workflows/check-devedition.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
TESTRAIL_API_KEY: ${{ secrets.TESTRAIL_API_KEY }}
2626
TESTRAIL_USERNAME: ${{ secrets.TESTRAIL_USERNAME }}
2727
FX_CHANNEL: "devedition"
28+
STARFOX_SPLIT: smoke
2829
run: |
2930
pip3 install 'pipenv==2023.11.15';
3031
pipenv install
@@ -33,17 +34,19 @@ jobs:
3334
Run-Win-Smoke:
3435
needs: Check-DevEdition-Version
3536
if: ${{ needs.Check-DevEdition-Version.outputs.win_reportable == 'True' }}
36-
uses: ./.github/workflows/smoke.yml
37+
uses: ./.github/workflows/main.yml
3738
with:
3839
channel: "devedition"
39-
job_to_run: Smoke-Windows
40+
job_to_run: Test-Windows
41+
test_set: smoke
4042
secrets: inherit
4143

4244
Run-Mac-Smoke:
4345
needs: Check-DevEdition-Version
4446
if: ${{ needs.Check-DevEdition-Version.outputs.mac_reportable == 'True' }}
45-
uses: ./.github/workflows/smoke.yml
47+
uses: ./.github/workflows/main.yml
4648
with:
4749
channel: "devedition"
48-
job_to_run: Smoke-MacOS
50+
job_to_run: Test-MacOS
51+
test_set: smoke
4952
secrets: inherit

.github/workflows/ci-dispatch.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ jobs:
2525
Run-Smoke-Win:
2626
needs: Select-Channels
2727
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'smoke')
28-
uses: ./.github/workflows/smoke.yml
28+
uses: ./.github/workflows/main.yml
2929
with:
30-
job_to_run: Smoke-Windows
30+
job_to_run: Test-Windows
3131
is_pull_request: true
3232
secrets: inherit
3333

3434
Run-Smoke-Mac:
3535
needs: Select-Channels
3636
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'smoke')
37-
uses: ./.github/workflows/smoke.yml
37+
uses: ./.github/workflows/main.yml
3838
with:
39-
job_to_run: Smoke-MacOS
39+
job_to_run: Test-MacOS
4040
is_pull_request: true
4141
secrets: inherit
4242

.github/workflows/l10n.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ jobs:
195195
echo $gecko_url
196196
Invoke-WebRequest -Uri $gecko_url -OutFile "geckodriver.zip"
197197
unzip geckodriver.zip
198+
echo "$env:GITHUB_WORKSPACE" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
198199
shell: pwsh
199200
- name: Download Beta
200201
if: ${{ !inputs.win_installer_link }}
@@ -230,7 +231,7 @@ jobs:
230231
$line = $_
231232
Write-Host "Running tests for: $line"
232233
try {
233-
pipenv run python -m l10n_CM.run_l10n --fx-executable="$env:FX_EXECUTABLE" $line
234+
pipenv run python -m l10n_CM.run_l10n --geckodriver=geckodriver.exe --fx-executable="$env:FX_EXECUTABLE" $line
234235
} catch {
235236
$SCRIPT_EXIT_CODE = $_.Exception.HResult
236237
}
Lines changed: 41 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Smoke Test Execution
2+
name: Fx Test Execution
33

44
run-name: ${{ github.actor }} is running smoke tests
55
on:
@@ -17,6 +17,11 @@ on:
1717
description: "Is this a PR?"
1818
default: false
1919
type: boolean
20+
test_set:
21+
description: "Test set to run"
22+
default: null
23+
required: false
24+
type: string
2025
workflow_dispatch:
2126
inputs:
2227
win_installer_link:
@@ -39,8 +44,8 @@ env:
3944
SVC_ACCT_DECRYPT: ${{ secrets.SVC_ACCT_DECRYPT }}
4045

4146
jobs:
42-
Smoke-Windows:
43-
if: ${{ inputs.job_to_run == 'Smoke-Windows' || inputs.win_installer_link }}
47+
Test-Windows:
48+
if: ${{ inputs.job_to_run == 'Test-Windows' || inputs.win_installer_link }}
4449
runs-on: windows-latest
4550
steps:
4651
- name: Checkout repository
@@ -52,20 +57,22 @@ jobs:
5257
- name: Set Environment (Manual)
5358
if: ${{ inputs.win_installer_link }}
5459
run: |
55-
$env_contents = @"
56-
MANUAL='true'
57-
"@
58-
New-item -Name .env -Value $env_contents -ItemType File -Force
60+
echo "MANUAL=true" | Out-File -FilePath .env -Encoding utf8 -Append -Force
5961
Write-Host "Running smoke tests on supplied executable"
6062
- name: Set Environment (Scheduled Beta)
61-
if: ${{ inputs.job_to_run == 'Smoke-Windows' && inputs.is_pull_request == false}}
63+
if: ${{ inputs.job_to_run == 'Test-Windows' && inputs.is_pull_request == false}}
6264
run: |
63-
$env_contents = @"
64-
TESTRAIL_REPORT='true'
65-
"@
66-
New-item -Name .env -Value $env_contents -ItemType File -Force
65+
echo "TESTRAIL_REPORT=true" | Out-File -FilePath .env -Encoding utf8 -Append -Force
6766
Write-Host "Running report for most recent Beta on Windows"
68-
Write-Host "$env:TESTRAIL_USERNAME"
67+
- name: Select Test Set
68+
if: ${{ inputs.test_set != null }}
69+
run: |
70+
echo "STARFOX_SPLIT=${{ inputs.test_set }}" | Out-File -FilePath .env -Encoding utf8 -Append -Force
71+
shell: pwsh
72+
- name: Set Functional Split
73+
if: ${{ inputs.test_set == 'functional' }}
74+
run: |
75+
echo "STARFOX_SPLIT=${{ inputs.test_set }}1" | Out-File -FilePath .env -Encoding utf8 -Append -Force
6976
- name: Install dependencies
7077
run: |
7178
mkdir -p artifacts;
@@ -80,6 +87,7 @@ jobs:
8087
echo $gecko_url
8188
Invoke-WebRequest -Uri $gecko_url -OutFile "geckodriver.zip"
8289
unzip geckodriver.zip
90+
echo "$env:GITHUB_WORKSPACE" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
8391
shell: pwsh
8492
- name: Download Beta
8593
if: ${{ !inputs.win_installer_link }}
@@ -94,6 +102,7 @@ jobs:
94102
env:
95103
WIN_INSTALLER_LINK: ${{ inputs.win_installer_link }}
96104
run: |
105+
echo "STARFOX_SPLIT=ci-extended" | Out-File -FilePath .env -Encoding utf8 -Append -Force
97106
Invoke-WebRequest -Uri $WIN_INSTALLER_LINK -OutFile "${{ github.workspace }}\setup.exe"
98107
New-Item -ItemType Directory -Path "C:\Program Files\Custom Firefox" -Force
99108
shell: pwsh
@@ -102,18 +111,18 @@ jobs:
102111
run: |
103112
Start-Process -FilePath "${{ github.workspace }}\setup.exe" -ArgumentList "/S", '/D=C:\Program Files\Custom Firefox' -Wait -NoNewWindow -PassThru
104113
shell: pwsh
105-
- name: Run Smoke Tests in Win
114+
- name: Run Tests in Win
106115
if: steps.setup.conclusion == 'success'
107116
run: |
108117
pipenv run python -c "import sys; print(sys.platform)"
109118
$env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe"
110119
Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow
111120
pipenv run python choose_ci_set.py
112-
pipenv run pytest --geckodriver geckodriver.exe $(cat selected_tests)
121+
pipenv run pytest $(cat selected_tests) --geckodriver=geckodriver.exe
113122
$env:TEST_EXIT_CODE = $LASTEXITCODE
114123
mv artifacts artifacts-win || true
115124
exit $env:TEST_EXIT_CODE
116-
- name: Run Smoke Tests in Win (Headed)
125+
- name: Run Tests in Win (Headed)
117126
if: steps.setup.conclusion == 'success' && always()
118127
env:
119128
REPORTABLE: true
@@ -122,7 +131,7 @@ jobs:
122131
mv ./ci_pyproject_headed.toml ./pyproject.toml;
123132
$env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe"
124133
pipenv run python choose_ci_set.py
125-
pipenv run pytest --geckodriver geckodriver.exe $(cat selected_tests)
134+
pipenv run pytest $(cat selected_tests) --geckodriver=geckodriver.exe
126135
$env:TEST_EXIT_CODE = $LASTEXITCODE
127136
rm artifacts/assets -r -Force
128137
Get-ChildItem -Path "artifacts" | ForEach-Object {
@@ -142,8 +151,8 @@ jobs:
142151
with:
143152
name: artifacts-win-smoke
144153
path: artifacts-win
145-
Smoke-MacOS:
146-
if: ${{ inputs.job_to_run == 'Smoke-MacOS' || inputs.mac_installer_link }}
154+
Test-MacOS:
155+
if: ${{ inputs.job_to_run == 'Test-MacOS' || inputs.mac_installer_link }}
147156
runs-on: macos-latest
148157
steps:
149158
- name: Checkout repository
@@ -158,14 +167,21 @@ jobs:
158167
exit $?
159168
echo "Triggered by event: ${{ github.event_name }}"
160169
- name: Set Environment (Scheduled Beta)
161-
if: ${{ inputs.job_to_run == 'Smoke-MacOS' && inputs.is_pull_request == false}}
170+
if: ${{ inputs.job_to_run == 'Test-MacOS' && inputs.is_pull_request == false}}
162171
run: |
163172
echo "TESTRAIL_REPORT='true'" >> "$GITHUB_ENV";
164173
echo "Running report for most recent Beta on MacOS";
174+
- name: Select Test Set
175+
if: ${{ inputs.test_set != null }}
176+
run: echo "STARFOX_SPLIT=${{ inputs.test_set }}" >> .env
177+
- name: Set Functional Split
178+
if: ${{ inputs.test_set == 'functional' }}
179+
run: echo "STARFOX_SPLIT=${{ inputs.test_set }}1" >> .env
165180
- name: Set Environment (Manual)
166181
if: ${{ inputs.mac_installer_link }}
167182
run: |
168183
echo "MANUAL='true'" >> "$GITHUB_ENV";
184+
echo "STARFOX_SPLIT=ci-extended" >> .env
169185
echo "Running smoke tests on supplied executable";
170186
- name: Install dependencies
171187
run: |
@@ -181,7 +197,7 @@ jobs:
181197
MANUAL_DOWNLOAD_LINK: ${{ inputs.mac_installer_link }}
182198
run:
183199
echo app_name=$(bash ./collect_executables.sh | xargs -0 ./parse_executables.sh) >> "$GITHUB_OUTPUT"
184-
- name: Run Smoke Tests in MacOS
200+
- name: Run Tests in MacOS
185201
if: steps.setup.conclusion == 'success'
186202
env:
187203
FX_EXECUTABLE: /Volumes/${{ steps.setup.outputs.app_name }}/${{ steps.setup.outputs.app_name }}.app/Contents/MacOS/firefox
@@ -191,7 +207,7 @@ jobs:
191207
pipenv run pytest --fx-executable="$FX_EXECUTABLE" $(cat selected_tests) || TEST_EXIT_CODE=$?
192208
mv artifacts artifacts-mac || true
193209
exit $TEST_EXIT_CODE
194-
- name: Run Smoke Tests in MacOS (Headed)
210+
- name: Run Tests in MacOS (Headed)
195211
if: steps.setup.conclusion == 'success' && always()
196212
env:
197213
FX_EXECUTABLE: /Volumes/${{ steps.setup.outputs.app_name }}/${{ steps.setup.outputs.app_name }}.app/Contents/MacOS/firefox
@@ -229,6 +245,7 @@ jobs:
229245
MANUAL_DOWNLOAD_LINK: ${{ inputs.linux_tarball_link }}
230246
run: |
231247
echo "MANUAL='true'" >> "$GITHUB_ENV";
248+
echo "STARFOX_SPLIT=ci-extended" >> "$GITHUB_ENV"
232249
echo "Running smoke tests on supplied executable";
233250
sudo apt install gnome-screenshot
234251
uname -m;
@@ -265,8 +282,8 @@ jobs:
265282
if: ${{ github.event_name != 'workflow_dispatch' }}
266283
runs-on: ubuntu-latest
267284
needs:
268-
- Smoke-Windows
269-
- Smoke-MacOS
285+
- Test-Windows
286+
- Test-MacOS
270287
steps:
271288
- name: Checkout repository
272289
uses: actions/checkout@v4

0 commit comments

Comments
 (0)