Skip to content

Commit 367298d

Browse files
Merge branch 'main' into philimon/sync_fxa_test
2 parents 31bb0cc + 8fb4410 commit 367298d

File tree

107 files changed

+1858
-164
lines changed

Some content is hidden

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

107 files changed

+1858
-164
lines changed

.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: "40 */1 * * *"
5+
- cron: "21 */1 * * *"
66
env:
77
LATEST: ""
88
permissions:

.github/workflows/check-beta.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,4 @@ jobs:
4747
uses: ./.github/workflows/smoke.yml
4848
with:
4949
job_to_run: Smoke-MacOS
50-
secrets: inherit
50+
secrets: inherit

.github/workflows/ci-dispatch.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
name: DTE Automation Dispatch
3+
4+
run-name: CI tests kicked off by ${{ github.actor }}
5+
on:
6+
pull_request:
7+
permissions:
8+
contents: "write"
9+
10+
jobs:
11+
Select-Channels:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
channels: ${{ steps.dispatch.outputs.channels }}
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
- name: Select test channels
19+
id: dispatch
20+
run: |
21+
python3 choose_test_channel.py
22+
echo channels=$(python3 choose_test_channel.py) >> "$GITHUB_OUTPUT"
23+
24+
25+
Run-Smoke-Win:
26+
needs: Select-Channels
27+
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'smoke')
28+
uses: ./.github/workflows/smoke.yml
29+
with:
30+
job_to_run: Smoke-Windows
31+
is_pull_request: true
32+
secrets: inherit
33+
34+
Run-Smoke-Mac:
35+
needs: Select-Channels
36+
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'smoke')
37+
uses: ./.github/workflows/smoke.yml
38+
with:
39+
job_to_run: Smoke-MacOS
40+
is_pull_request: true
41+
secrets: inherit
42+
43+
Run-L10n-Win:
44+
needs: Select-Channels
45+
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'l10n')
46+
uses: ./.github/workflows/l10n.yml
47+
with:
48+
job_to_run: L10n-Windows
49+
is_pull_request: true
50+
secrets: inherit
51+
52+
Run-L10n-Mac:
53+
needs: Select-Channels
54+
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'l10n')
55+
uses: ./.github/workflows/l10n.yml
56+
with:
57+
job_to_run: L10n-MacOS
58+
is_pull_request: true
59+
secrets: inherit
60+
61+
Run-L10n-Linux:
62+
needs: Select-Channels
63+
if: contains(fromJSON(needs.Select-Channels.outputs.channels), 'l10n')
64+
uses: ./.github/workflows/l10n.yml
65+
with:
66+
job_to_run: L10n-Linux
67+
is_pull_request: true
68+
secrets: inherit

.github/workflows/l10n.yml

Lines changed: 15 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: L10N Test Execution
33

44
run-name: ${{ github.actor }} is running l10n tests
55
on:
6-
pull_request:
76
workflow_call:
87
inputs:
98
channel:
@@ -14,6 +13,10 @@ on:
1413
job_to_run:
1514
required: true
1615
type: string
16+
is_pull_request:
17+
description: "Is this a PR?"
18+
default: false
19+
type: boolean
1720
workflow_dispatch:
1821
inputs:
1922
win_installer_link:
@@ -38,25 +41,17 @@ env:
3841

3942
jobs:
4043
L10N-MacOS:
41-
if: ${{ inputs.job_to_run == 'L10N-MacOS' || github.event_name == 'pull_request' || inputs.mac_installer_link }}
44+
if: ${{ inputs.job_to_run == 'L10N-MacOS' || inputs.mac_installer_link }}
4245
runs-on: macos-latest
4346
steps:
44-
- name: Create app token
45-
uses: actions/create-github-app-token@v1
46-
id: app-token
47-
with:
48-
app-id: ${{ secrets.BOT_CLIENT_ID }}
49-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
5047
- name: Checkout repository
5148
uses: actions/checkout@v4
52-
with:
53-
token: ${{ steps.app-token.outputs.token }}
5449
- name: Set up Python 3.11
5550
uses: actions/setup-python@v5
5651
with:
5752
python-version: "3.11"
5853
- name: Set Environment (Scheduled Beta)
59-
if: ${{ inputs.job_to_run == 'L10N-MacOS' }}
54+
if: ${{ inputs.job_to_run == 'L10N-MacOS' && inputs.is_pull_request == false }}
6055
run: |
6156
echo "TESTRAIL_REPORT='true'" >> "$GITHUB_ENV";
6257
echo "Running report for most recent Beta on MacOS";
@@ -123,25 +118,17 @@ jobs:
123118
name: artifacts-mac
124119
path: artifacts-mac
125120
L10N-Linux:
126-
if: ${{ inputs.job_to_run == 'L10N-Linux' || github.event_name == 'pull_request' || inputs.linux_tarball_link }}
121+
if: ${{ inputs.job_to_run == 'L10N-Linux' || inputs.linux_tarball_link }}
127122
runs-on: ubuntu-latest
128123
steps:
129-
- name: Create app token
130-
uses: actions/create-github-app-token@v1
131-
id: app-token
132-
with:
133-
app-id: ${{ secrets.BOT_CLIENT_ID }}
134-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
135124
- name: Checkout repository
136125
uses: actions/checkout@v4
137-
with:
138-
token: ${{ steps.app-token.outputs.token }}
139126
- name: Set up Python 3.11
140127
uses: actions/setup-python@v5
141128
with:
142129
python-version: "3.11"
143130
- name: Set Environment (Scheduled Beta)
144-
if: ${{ inputs.job_to_run == 'L10N-Linux' }}
131+
if: ${{ inputs.job_to_run == 'L10N-Linux' && inputs.is_pull_request == false }}
145132
run: |
146133
echo "TESTRAIL_REPORT='true'" >> "$GITHUB_ENV";
147134
echo "Running report for most recent Beta on Linux";
@@ -200,25 +187,17 @@ jobs:
200187
fi
201188
exit $SCRIPT_EXIT_CODE;
202189
- name: Upload artifacts
203-
if: ${{ always() && github.event_name == 'pull_request' }}
190+
if: ${{ always() && inputs.is_pull_request == true }}
204191
uses: actions/upload-artifact@v4
205192
with:
206193
name: artifacts-linux
207194
path: artifacts-linux
208195
L10N-Windows:
209-
if: ${{ inputs.job_to_run == 'L10N-Windows' || github.event_name == 'pull_request' || inputs.win_installer_link }}
196+
if: ${{ inputs.job_to_run == 'L10N-Windows' || inputs.win_installer_link }}
210197
runs-on: windows-latest
211198
steps:
212-
- name: Create app token
213-
uses: actions/create-github-app-token@v1
214-
id: app-token
215-
with:
216-
app-id: ${{ secrets.BOT_CLIENT_ID }}
217-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
218199
- name: Checkout repository
219200
uses: actions/checkout@v4
220-
with:
221-
token: ${{ steps.app-token.outputs.token }}
222201
- name: Set up Python 3.11
223202
uses: actions/setup-python@v5
224203
with:
@@ -232,7 +211,7 @@ jobs:
232211
New-item -Name .env -Value $env_contents -ItemType File -Force
233212
Write-Host "Running l10n tests on supplied executable"
234213
- name: Set Environment (Scheduled Beta)
235-
if: ${{ inputs.job_to_run == 'L10N-Windows' }}
214+
if: ${{ inputs.job_to_run == 'L10N-Windows' && inputs.is_pull_request == false}}
236215
run: |
237216
$env_contents = @"
238217
TESTRAIL_REPORT='true'
@@ -340,7 +319,7 @@ jobs:
340319
}
341320
exit $env:SCRIPT_EXIT_CODE
342321
- name: Upload artifacts
343-
if: ${{ always() && github.event_name == 'pull_request' }}
322+
if: ${{ always() && inputs.is_pull_request == true }}
344323
uses: actions/upload-artifact@v4
345324
with:
346325
name: artifacts-win
@@ -367,17 +346,17 @@ jobs:
367346
- name: Download Windows artifact
368347
uses: actions/download-artifact@v4
369348
with:
370-
name: artifacts-win
349+
name: artifacts-win-l10n
371350
path: artifacts-win
372351
- name: Download Linux artifact
373352
uses: actions/download-artifact@v4
374353
with:
375-
name: artifacts-linux
354+
name: artifacts-linux-l10n
376355
path: artifacts-linux
377356
- name: Download MacOS artifact
378357
uses: actions/download-artifact@v4
379358
with:
380-
name: artifacts-mac
359+
name: artifacts-mac-l10n
381360
path: artifacts-mac
382361
- name: List downloaded Windows files
383362
run: ls artifacts-win/

.github/workflows/smoke.yml

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Smoke Test Execution
33

44
run-name: ${{ github.actor }} is running smoke tests
55
on:
6-
pull_request:
76
workflow_call:
87
inputs:
98
channel:
@@ -14,6 +13,10 @@ on:
1413
job_to_run:
1514
required: true
1615
type: string
16+
is_pull_request:
17+
description: "Is this a PR?"
18+
default: false
19+
type: boolean
1720
workflow_dispatch:
1821
inputs:
1922
win_installer_link:
@@ -37,19 +40,11 @@ env:
3740

3841
jobs:
3942
Smoke-Windows:
40-
if: ${{ inputs.job_to_run == 'Smoke-Windows' || github.event_name == 'pull_request' || inputs.win_installer_link }}
43+
if: ${{ inputs.job_to_run == 'Smoke-Windows' || inputs.win_installer_link }}
4144
runs-on: windows-latest
4245
steps:
43-
- name: Create app token
44-
uses: actions/create-github-app-token@v1
45-
id: app-token
46-
with:
47-
app-id: ${{ secrets.BOT_CLIENT_ID }}
48-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
4946
- name: Checkout repository
5047
uses: actions/checkout@v4
51-
with:
52-
token: ${{ steps.app-token.outputs.token }}
5348
- name: Set up Python 3.11
5449
uses: actions/setup-python@v5
5550
with:
@@ -63,7 +58,7 @@ jobs:
6358
New-item -Name .env -Value $env_contents -ItemType File -Force
6459
Write-Host "Running smoke tests on supplied executable"
6560
- name: Set Environment (Scheduled Beta)
66-
if: ${{ inputs.job_to_run == 'Smoke-Windows' }}
61+
if: ${{ inputs.job_to_run == 'Smoke-Windows' && inputs.is_pull_request == false}}
6762
run: |
6863
$env_contents = @"
6964
TESTRAIL_REPORT='true'
@@ -112,7 +107,7 @@ jobs:
112107
$env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe"
113108
Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow
114109
pipenv run python choose_ci_set.py
115-
pipenv run pytest -n 4 $(cat selected_tests)
110+
pipenv run pytest $(cat selected_tests)
116111
$env:TEST_EXIT_CODE = $LASTEXITCODE
117112
mv artifacts artifacts-win || true
118113
exit $env:TEST_EXIT_CODE
@@ -143,22 +138,14 @@ jobs:
143138
if: ${{ always() && github.event_name == 'pull_request' }}
144139
uses: actions/upload-artifact@v4
145140
with:
146-
name: artifacts-win
141+
name: artifacts-win-smoke
147142
path: artifacts-win
148143
Smoke-MacOS:
149-
if: ${{ inputs.job_to_run == 'Smoke-MacOS' || github.event_name == 'pull_request' || inputs.mac_installer_link }}
144+
if: ${{ inputs.job_to_run == 'Smoke-MacOS' || inputs.mac_installer_link }}
150145
runs-on: macos-latest
151146
steps:
152-
- name: Create app token
153-
uses: actions/create-github-app-token@v1
154-
id: app-token
155-
with:
156-
app-id: ${{ secrets.BOT_CLIENT_ID }}
157-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
158147
- name: Checkout repository
159148
uses: actions/checkout@v4
160-
with:
161-
token: ${{ steps.app-token.outputs.token }}
162149
- name: Set up Python 3.11
163150
uses: actions/setup-python@v5
164151
with:
@@ -169,7 +156,7 @@ jobs:
169156
exit $?
170157
echo "Triggered by event: ${{ github.event_name }}"
171158
- name: Set Environment (Scheduled Beta)
172-
if: ${{ inputs.job_to_run == 'Smoke-MacOS' }}
159+
if: ${{ inputs.job_to_run == 'Smoke-MacOS' && inputs.is_pull_request == false}}
173160
run: |
174161
echo "TESTRAIL_REPORT='true'" >> "$GITHUB_ENV";
175162
echo "Running report for most recent Beta on MacOS";
@@ -199,7 +186,7 @@ jobs:
199186
run: |
200187
"$FX_EXECUTABLE" --version
201188
pipenv run python choose_ci_set.py
202-
pipenv run pytest --fx-executable="$FX_EXECUTABLE" -n 4 $(cat selected_tests) || TEST_EXIT_CODE=$?
189+
pipenv run pytest --fx-executable="$FX_EXECUTABLE" $(cat selected_tests) || TEST_EXIT_CODE=$?
203190
mv artifacts artifacts-mac || true
204191
exit $TEST_EXIT_CODE
205192
- name: Run Smoke Tests in MacOS (Headed)
@@ -217,22 +204,14 @@ jobs:
217204
if: ${{ always() && github.event_name == 'pull_request' }}
218205
uses: actions/upload-artifact@v4
219206
with:
220-
name: artifacts-mac
207+
name: artifacts-mac-smoke
221208
path: artifacts-mac
222209
Smoke-Linux:
223210
if: ${{ inputs.linux_tarball_link }}
224211
runs-on: ubuntu-latest
225212
steps:
226-
- name: Create app token
227-
uses: actions/create-github-app-token@v1
228-
id: app-token
229-
with:
230-
app-id: ${{ secrets.BOT_CLIENT_ID }}
231-
private-key: ${{ secrets.BOT_PRIVATE_KEY }}
232213
- name: Checkout repository
233214
uses: actions/checkout@v4
234-
with:
235-
token: ${{ steps.app-token.outputs.token }}
236215
- name: Set up Python 3.11
237216
uses: actions/setup-python@v5
238217
with:
@@ -268,7 +247,7 @@ jobs:
268247
"$FX_EXECUTABLE" --version;
269248
pipenv run python choose_ci_set.py;
270249
Xvfb :99 -screen 0 '1600x1200x24' > artifacts/xvfb.log &
271-
DISPLAY=:99 pipenv run pytest --fx-executable="$FX_EXECUTABLE" -n 4 $(cat selected_tests) || TEST_EXIT_CODE=$?
250+
DISPLAY=:99 pipenv run pytest --fx-executable="$FX_EXECUTABLE" $(cat selected_tests) || TEST_EXIT_CODE=$?
272251
exit $TEST_EXIT_CODE
273252
- name: Run Smoke Tests in Ubuntu (Headed)
274253
if: steps.setup.conclusion == 'success' && always()

0 commit comments

Comments
 (0)