37
37
38
38
jobs :
39
39
L10N-MacOS :
40
- if : ${{ inputs.job_to_run == 'L10N-MacOS' || inputs.mac_installer_link }}
40
+ if : ${{ github.event_name == 'pull_request' || inputs.job_to_run == 'L10N-MacOS' || inputs.mac_installer_link }}
41
41
runs-on : macos-latest
42
42
steps :
43
43
- name : Create app token
@@ -71,57 +71,57 @@ jobs:
71
71
pip3 install 'ruff>=0.4.8,<0.5';
72
72
rm ./pyproject.toml;
73
73
mv ./ci_pyproject.toml ./pyproject.toml;
74
- pipenv install
74
+ pipenv install;
75
75
- name : Install Fx
76
76
id : setup
77
77
env :
78
78
MANUAL_DOWNLOAD_LINK : ${{ inputs.mac_installer_link }}
79
79
run :
80
- echo app_name=$(bash ./collect_executables.sh | xargs -0 ./parse_executables.sh) >> "$GITHUB_OUTPUT"
80
+ echo app_name=$(bash ./collect_executables.sh | xargs -0 ./parse_executables.sh) >> "$GITHUB_OUTPUT";
81
81
- name : Run L10N Tests in MacOS
82
82
if : steps.setup.conclusion == 'success'
83
83
env :
84
84
FX_EXECUTABLE : /Volumes/${{ steps.setup.outputs.app_name }}/${{ steps.setup.outputs.app_name }}.app/Contents/MacOS/firefox
85
85
run : |
86
- "$FX_EXECUTABLE" --version
87
- echo "0" > TEST_EXIT_CODE
88
- pipenv run python check_l10n_test_cases.py
86
+ "$FX_EXECUTABLE" --version;
87
+ echo "0" > TEST_EXIT_CODE;
88
+ pipenv run python check_l10n_test_cases.py;
89
89
while IFS= read -r line; do
90
- echo "Running tests for: $line"
91
- pipenv run python l10n_CM/run_l10n.py --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?
92
- done < selected_l10n_mappings
93
- mv artifacts artifacts-mac || true
94
- EXIT_CODE=$(cat TEST_EXIT_CODE)
90
+ echo "Running tests for: $line";
91
+ pipenv run python l10n_CM/run_l10n.py --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?;
92
+ done < selected_l10n_mappings;
93
+ mv artifacts artifacts-mac || true;
94
+ EXIT_CODE=$(cat TEST_EXIT_CODE);
95
95
if [ $EXIT_CODE != 0 ]; then
96
- exit $EXIT_CODE
96
+ exit $EXIT_CODE;
97
97
fi
98
- exit $SCRIPT_EXIT_CODE
98
+ exit $SCRIPT_EXIT_CODE;
99
99
- name : Run L10N Tests in MacOS (Headed)
100
100
if : steps.setup.conclusion == 'success' && always()
101
101
env :
102
102
FX_EXECUTABLE : /Volumes/${{ steps.setup.outputs.app_name }}/${{ steps.setup.outputs.app_name }}.app/Contents/MacOS/firefox
103
103
REPORTABLE : ${{ env.TESTRAIL_REPORT == 'true' }}
104
104
run : |
105
105
mv ./ci_l10n_pyproject_headed.toml ./pyproject.toml;
106
- echo "0" > TEST_EXIT_CODE
106
+ echo "0" > TEST_EXIT_CODE;
107
107
while IFS= read -r line; do
108
- echo "Running tests for: $line"
109
- pipenv run python l10n_CM/run_l10n.py --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?
110
- done < selected_l10n_mappings
111
- mv -n artifacts/* artifacts-mac/ || true
112
- EXIT_CODE=$(cat TEST_EXIT_CODE)
108
+ echo "Running tests for: $line";
109
+ pipenv run python l10n_CM/run_l10n.py --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?;
110
+ done < selected_l10n_mappings;
111
+ mv -n artifacts/* artifacts-mac/ || true;
112
+ EXIT_CODE=$(cat TEST_EXIT_CODE);
113
113
if [ $EXIT_CODE != 0 ]; then
114
- exit $EXIT_CODE
114
+ exit $EXIT_CODE;
115
115
fi
116
- exit $SCRIPT_EXIT_CODE
116
+ exit $SCRIPT_EXIT_CODE;
117
117
- name : Upload artifacts
118
118
if : ${{ always() && github.event_name == 'pull_request' }}
119
119
uses : actions/upload-artifact@v4
120
120
with :
121
121
name : artifacts-mac
122
122
path : artifacts-mac
123
123
L10N-Linux :
124
- if : ${{ inputs.linux_tarball_link }}
124
+ if : ${{ github.event_name == 'pull_request' || inputs.job_to_run == 'L10N-Linux' || inputs.linux_tarball_link }}
125
125
runs-on : ubuntu-latest
126
126
steps :
127
127
- name : Create app token
@@ -145,58 +145,60 @@ jobs:
145
145
run : |
146
146
echo "MANUAL='true'" >> "$GITHUB_ENV";
147
147
echo "Running l10n tests on supplied executable";
148
- sudo apt install gnome-screenshot
148
+ sudo apt install gnome-screenshot;
149
149
uname -m;
150
150
mkdir -p artifacts;
151
151
pip3 install 'pipenv==2023.11.15';
152
152
pip3 install 'ruff>=0.4.8,<0.5';
153
153
rm ./pyproject.toml;
154
154
mv ./ci_xvfb_pyproject.toml ./pyproject.toml;
155
155
pipenv install;
156
- ./collect_executables.sh
156
+ ./collect_executables.sh;
157
157
./firefox/firefox --version;
158
- #. ./keyring-unlock.sh;
159
158
- name : Run L10N Tests in Ubuntu
160
159
if : steps.setup.conclusion == 'success'
161
160
env :
162
161
FX_EXECUTABLE : ./firefox/firefox
163
162
run : |
164
- "$FX_EXECUTABLE" --version
165
- echo "0" > TEST_EXIT_CODE
166
- pipenv run python check_l10n_test_cases.py
163
+ "$FX_EXECUTABLE" --version;
164
+ echo "0" > TEST_EXIT_CODE;
165
+ pipenv run python check_l10n_test_cases.py;
167
166
Xvfb :99 -screen 0 '1600x1200x24' > artifacts/xvfb.log &
168
167
while IFS= read -r line; do
169
- echo "Running tests for: $line"
170
- DISPLAY=:99 pipenv run python l10n_CM/run_l10n.py --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?
171
- done < selected_l10n_mappings
172
- mv artifacts artifacts-mac || true
173
- EXIT_CODE=$(cat TEST_EXIT_CODE)
168
+ echo "Running tests for: $line";
169
+ DISPLAY=:99 pipenv run python l10n_CM/run_l10n.py --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?;
170
+ done < selected_l10n_mappings;
171
+ mv artifacts artifacts-linux || true;
172
+ EXIT_CODE=$(cat TEST_EXIT_CODE);
174
173
if [ $EXIT_CODE != 0 ]; then
175
- exit $EXIT_CODE
174
+ exit $EXIT_CODE;
176
175
fi
177
- exit $SCRIPT_EXIT_CODE
176
+ exit $SCRIPT_EXIT_CODE;
178
177
- name : Run Smoke Tests in Ubuntu (Headed)
179
178
if : steps.setup.conclusion == 'success' && always()
180
179
env :
181
180
FX_EXECUTABLE : ./firefox/firefox
182
181
run : |
183
182
mv ./ci_xvfb_pyproject_headed.toml ./pyproject.toml;
184
- echo "0" > TEST_EXIT_CODE
183
+ echo "0" > TEST_EXIT_CODE;
185
184
while IFS= read -r line; do
186
- echo "Running tests for: $line"
187
- DISPLAY=:99 pipenv run python l10n_CM/run_l10n.py --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?
188
- done < selected_l10n_mappings
189
- mv -n artifacts/* artifacts-mac / || true
190
- EXIT_CODE=$(cat TEST_EXIT_CODE)
185
+ echo "Running tests for: $line";
186
+ DISPLAY=:99 pipenv run python l10n_CM/run_l10n.py --fx-executable="$FX_EXECUTABLE" $line || SCRIPT_EXIT_CODE=$?;
187
+ done < selected_l10n_mappings;
188
+ mv -n artifacts/* artifacts-linux / || true;
189
+ EXIT_CODE=$(cat TEST_EXIT_CODE);
191
190
if [ $EXIT_CODE != 0 ]; then
192
- exit $EXIT_CODE
191
+ exit $EXIT_CODE;
193
192
fi
194
- exit $SCRIPT_EXIT_CODE
195
-
196
-
197
-
193
+ exit $SCRIPT_EXIT_CODE;
194
+ - name : Upload artifacts
195
+ if : ${{ always() && github.event_name == 'pull_request' }}
196
+ uses : actions/upload-artifact@v4
197
+ with :
198
+ name : artifacts-linux
199
+ path : artifacts-linux
198
200
L10N-Windows :
199
- if : ${{ inputs.job_to_run == 'L10N-Windows' || inputs.win_installer_link }}
201
+ if : ${{ github.event_name == 'pull_request' || inputs.job_to_run == 'L10N-Windows' || inputs.win_installer_link }}
200
202
runs-on : windows-latest
201
203
steps :
202
204
- name : Create app token
@@ -338,6 +340,7 @@ jobs:
338
340
needs :
339
341
- L10N-Windows
340
342
- L10N-MacOS
343
+ - L10N-Linux
341
344
steps :
342
345
- name : Checkout repository
343
346
uses : actions/checkout@v4
@@ -354,13 +357,20 @@ jobs:
354
357
with :
355
358
name : artifacts-win
356
359
path : artifacts-win
360
+ - name : Download Windows artifact
361
+ uses : actions/download-artifact@v4
362
+ with :
363
+ name : artifacts-linux
364
+ path : artifacts-linux
357
365
- name : Download MacOS artifact
358
366
uses : actions/download-artifact@v4
359
367
with :
360
368
name : artifacts-mac
361
369
path : artifacts-mac
362
- - name : List downloaded files
370
+ - name : List downloaded Windows files
363
371
run : ls artifacts-win/
372
+ - name : List downloaded Linux files
373
+ run : ls artifacts-linux/
364
374
- name : List downloaded MacOS files
365
375
run : ls artifacts-mac/
366
376
- name : Run script with secret
0 commit comments