Skip to content

Commit a9d4d8d

Browse files
committed
ci: allow playwright tests to test all and then fail at end
1 parent 0433428 commit a9d4d8d

7 files changed

+390
-1
lines changed

.github/workflows/playwright-chromium-linux.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,67 @@ jobs:
2626

2727
- name: Run Playwright unit tests in Chromium
2828
uses: nick-fields/retry@v2
29+
id: chromiumUnit
30+
continue-on-error: true
2931
with:
3032
timeout_minutes: 12
3133
max_attempts: 3
3234
command: npm run testChromium
3335

3436
- name: Run Playwright integration tests in Chromium
3537
uses: nick-fields/retry@v2
38+
id: chromiumIntegration
39+
continue-on-error: true
3640
with:
3741
timeout_minutes: 12
3842
max_attempts: 3
3943
command: npx cross-env TEST_ENV=integration npm run testChromium
4044

4145
- name: Run Playwright mainview tests in Chromium
4246
uses: nick-fields/retry@v2
47+
id: chromiumMainview
48+
continue-on-error: true
4349
with:
4450
timeout_minutes: 12
4551
max_attempts: 3
4652
command: npx cross-env TEST_ENV=mainview npm run testChromium
4753

4854
- name: Run Playwright livepreview tests in Chromium
4955
uses: nick-fields/retry@v2
56+
id: chromiumLivepreview
57+
continue-on-error: true
5058
with:
5159
timeout_minutes: 15
5260
max_attempts: 3
5361
command: npx cross-env TEST_ENV=livepreview npm run testChromium
5462

5563
- name: Run Playwright LegacyInteg tests in Chromium
5664
uses: nick-fields/retry@v2
65+
id: chromiumLegacyInteg
66+
continue-on-error: true
5767
with:
5868
timeout_minutes: 20
5969
max_attempts: 3
6070
command: npx cross-env TEST_ENV=LegacyInteg npm run testChromium
71+
72+
- name: Fail on test runs failed in Chromium Linux
73+
if: steps.chromiumUnit.outcome == 'failure' || steps.chromiumIntegration.outcome == 'failure' || steps.chromiumMainview.outcome == 'failure' || steps.chromiumLivepreview.outcome == 'failure' || steps.chromiumLegacyInteg.outcome == 'failure'
74+
run: |
75+
echo "Chromium Linux Playwright tests failed, marking step as failed"
76+
echo "Failed tests:"
77+
if [ "${{ steps.chromiumUnit.outcome }}" == "failure" ]; then
78+
echo "- Run Playwright unit tests in Chromium"
79+
fi
80+
if [ "${{ steps.chromiumIntegration.outcome }}" == "failure" ]; then
81+
echo "- Run Playwright integration tests in Chromium"
82+
fi
83+
if [ "${{ steps.chromiumMainview.outcome }}" == "failure" ]; then
84+
echo "- Run Playwright mainview tests in Chromium"
85+
fi
86+
if [ "${{ steps.chromiumLivepreview.outcome }}" == "failure" ]; then
87+
echo "- Run Playwright livepreview tests in Chromium"
88+
fi
89+
if [ "${{ steps.chromiumLegacyInteg.outcome }}" == "failure" ]; then
90+
echo "- Run Playwright LegacyInteg tests in Chromium"
91+
fi
92+
exit 1

.github/workflows/playwright-chromium-macos.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,67 @@ jobs:
2626

2727
- name: Run Playwright unit tests in Chromium
2828
uses: nick-fields/retry@v2
29+
id: chromiumUnit
30+
continue-on-error: true
2931
with:
3032
timeout_minutes: 12
3133
max_attempts: 3
3234
command: npm run testChromium
3335

3436
- name: Run Playwright integration tests in Chromium
3537
uses: nick-fields/retry@v2
38+
id: chromiumIntegration
39+
continue-on-error: true
3640
with:
3741
timeout_minutes: 12
3842
max_attempts: 3
3943
command: npx cross-env TEST_ENV=integration npm run testChromium
4044

4145
- name: Run Playwright mainview tests in Chromium
4246
uses: nick-fields/retry@v2
47+
id: chromiumMainview
48+
continue-on-error: true
4349
with:
4450
timeout_minutes: 12
4551
max_attempts: 3
4652
command: npx cross-env TEST_ENV=mainview npm run testChromium
4753

4854
- name: Run Playwright livepreview tests in Chromium
4955
uses: nick-fields/retry@v2
56+
id: chromiumLivepreview
57+
continue-on-error: true
5058
with:
5159
timeout_minutes: 15
5260
max_attempts: 3
5361
command: npx cross-env TEST_ENV=livepreview npm run testChromium
5462

5563
- name: Run Playwright LegacyInteg tests in Chromium
5664
uses: nick-fields/retry@v2
65+
id: chromiumLegacyInteg
66+
continue-on-error: true
5767
with:
5868
timeout_minutes: 20
5969
max_attempts: 3
6070
command: npx cross-env TEST_ENV=LegacyInteg npm run testChromium
71+
72+
- name: Fail on test runs failed in Chromium macOS
73+
if: steps.chromiumUnit.outcome == 'failure' || steps.chromiumIntegration.outcome == 'failure' || steps.chromiumMainview.outcome == 'failure' || steps.chromiumLivepreview.outcome == 'failure' || steps.chromiumLegacyInteg.outcome == 'failure'
74+
run: |
75+
echo "Chromium macOS Playwright tests failed, marking step as failed"
76+
echo "Failed tests:"
77+
if [ "${{ steps.chromiumUnit.outcome }}" == "failure" ]; then
78+
echo "- Run Playwright unit tests in Chromium"
79+
fi
80+
if [ "${{ steps.chromiumIntegration.outcome }}" == "failure" ]; then
81+
echo "- Run Playwright integration tests in Chromium"
82+
fi
83+
if [ "${{ steps.chromiumMainview.outcome }}" == "failure" ]; then
84+
echo "- Run Playwright mainview tests in Chromium"
85+
fi
86+
if [ "${{ steps.chromiumLivepreview.outcome }}" == "failure" ]; then
87+
echo "- Run Playwright livepreview tests in Chromium"
88+
fi
89+
if [ "${{ steps.chromiumLegacyInteg.outcome }}" == "failure" ]; then
90+
echo "- Run Playwright LegacyInteg tests in Chromium"
91+
fi
92+
exit 1

.github/workflows/playwright-chromium-windows-prod.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,68 @@ jobs:
2929

3030
- name: Run Playwright unit tests in Chromium for prod stage
3131
uses: nick-fields/retry@v2
32+
id: chromiumUnit
33+
continue-on-error: true
3234
with:
3335
timeout_minutes: 12
3436
max_attempts: 3
3537
command: npm run testChromiumDist
3638

3739
- name: Run Playwright integration tests in Chromium for prod stage
3840
uses: nick-fields/retry@v2
41+
id: chromiumIntegration
42+
continue-on-error: true
3943
with:
4044
timeout_minutes: 12
4145
max_attempts: 3
4246
command: npx cross-env TEST_ENV=integration npm run testChromiumDist
4347

4448
- name: Run Playwright mainview tests in Chromium for prod stage
4549
uses: nick-fields/retry@v2
50+
id: chromiumMainview
51+
continue-on-error: true
4652
with:
4753
timeout_minutes: 12
4854
max_attempts: 3
4955
command: npx cross-env TEST_ENV=mainview npm run testChromiumDist
5056

5157
- name: Run Playwright livepreview tests in Chromium for prod stage
5258
uses: nick-fields/retry@v2
59+
id: chromiumLivepreview
60+
continue-on-error: true
5361
with:
5462
timeout_minutes: 15
5563
max_attempts: 3
5664
command: npx cross-env TEST_ENV=livepreview npm run testChromiumDist
5765

5866
- name: Run Playwright LegacyInteg tests in Chromium for prod stage
5967
uses: nick-fields/retry@v2
68+
id: chromiumLegacyInteg
69+
continue-on-error: true
6070
with:
6171
timeout_minutes: 30
6272
max_attempts: 3
63-
command: npx cross-env TEST_ENV=LegacyInteg npm run testChromiumDist
73+
command: npx cross-env TEST_ENV=LegacyInteg npm run testChromiumDist
74+
75+
- name: Fail on test runs failed in Chromium Windows (prod sanity)
76+
if: steps.chromiumUnit.outcome == 'failure' || steps.chromiumIntegration.outcome == 'failure' || steps.chromiumMainview.outcome == 'failure' || steps.chromiumLivepreview.outcome == 'failure' || steps.chromiumLegacyInteg.outcome == 'failure'
77+
shell: bash
78+
run: |
79+
echo "Chromium Windows (prod) Playwright tests failed, marking step as failed"
80+
echo "Failed tests:"
81+
if [ "${{ steps.chromiumUnit.outcome }}" == "failure" ]; then
82+
echo "- Run Playwright unit tests in Chromium for prod stage"
83+
fi
84+
if [ "${{ steps.chromiumIntegration.outcome }}" == "failure" ]; then
85+
echo "- Run Playwright integration tests in Chromium for prod stage"
86+
fi
87+
if [ "${{ steps.chromiumMainview.outcome }}" == "failure" ]; then
88+
echo "- Run Playwright mainview tests in Chromium for prod stage"
89+
fi
90+
if [ "${{ steps.chromiumLivepreview.outcome }}" == "failure" ]; then
91+
echo "- Run Playwright livepreview tests in Chromium for prod stage"
92+
fi
93+
if [ "${{ steps.chromiumLegacyInteg.outcome }}" == "failure" ]; then
94+
echo "- Run Playwright LegacyInteg tests in Chromium for prod stage"
95+
fi
96+
exit 1

.github/workflows/playwright-chromium-windows.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,68 @@ jobs:
2626

2727
- name: Run Playwright unit tests in Chromium
2828
uses: nick-fields/retry@v2
29+
id: chromiumUnit
30+
continue-on-error: true
2931
with:
3032
timeout_minutes: 12
3133
max_attempts: 3
3234
command: npm run testChromium
3335

3436
- name: Run Playwright integration tests in Chromium
3537
uses: nick-fields/retry@v2
38+
id: chromiumIntegration
39+
continue-on-error: true
3640
with:
3741
timeout_minutes: 12
3842
max_attempts: 3
3943
command: npx cross-env TEST_ENV=integration npm run testChromium
4044

4145
- name: Run Playwright mainview tests in Chromium
4246
uses: nick-fields/retry@v2
47+
id: chromiumMainview
48+
continue-on-error: true
4349
with:
4450
timeout_minutes: 12
4551
max_attempts: 3
4652
command: npx cross-env TEST_ENV=mainview npm run testChromium
4753

4854
- name: Run Playwright livepreview tests in Chromium
4955
uses: nick-fields/retry@v2
56+
id: chromiumLivepreview
57+
continue-on-error: true
5058
with:
5159
timeout_minutes: 15
5260
max_attempts: 3
5361
command: npx cross-env TEST_ENV=livepreview npm run testChromium
5462

5563
- name: Run Playwright LegacyInteg tests in Chromium
5664
uses: nick-fields/retry@v2
65+
id: chromiumLegacyInteg
66+
continue-on-error: true
5767
with:
5868
timeout_minutes: 30
5969
max_attempts: 3
6070
command: npx cross-env TEST_ENV=LegacyInteg npm run testChromium
71+
72+
- name: Fail on test runs failed in Chromium Windows
73+
if: steps.chromiumUnit.outcome == 'failure' || steps.chromiumIntegration.outcome == 'failure' || steps.chromiumMainview.outcome == 'failure' || steps.chromiumLivepreview.outcome == 'failure' || steps.chromiumLegacyInteg.outcome == 'failure'
74+
shell: bash
75+
run: |
76+
echo "Chromium Windows Playwright tests failed, marking step as failed"
77+
echo "Failed tests:"
78+
if [ "${{ steps.chromiumUnit.outcome }}" == "failure" ]; then
79+
echo "- Run Playwright unit tests in Chromium"
80+
fi
81+
if [ "${{ steps.chromiumIntegration.outcome }}" == "failure" ]; then
82+
echo "- Run Playwright integration tests in Chromium"
83+
fi
84+
if [ "${{ steps.chromiumMainview.outcome }}" == "failure" ]; then
85+
echo "- Run Playwright mainview tests in Chromium"
86+
fi
87+
if [ "${{ steps.chromiumLivepreview.outcome }}" == "failure" ]; then
88+
echo "- Run Playwright livepreview tests in Chromium"
89+
fi
90+
if [ "${{ steps.chromiumLegacyInteg.outcome }}" == "failure" ]; then
91+
echo "- Run Playwright LegacyInteg tests in Chromium"
92+
fi
93+
exit 1

.github/workflows/playwright-firefox-linux.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,35 +26,67 @@ jobs:
2626

2727
- name: Run Playwright unit tests in Firefox
2828
uses: nick-fields/retry@v2
29+
id: firefoxUnit
30+
continue-on-error: true
2931
with:
3032
timeout_minutes: 12
3133
max_attempts: 3
3234
command: npm run testFirefox
3335

3436
- name: Run Playwright integration tests in Firefox
3537
uses: nick-fields/retry@v2
38+
id: firefoxIntegration
39+
continue-on-error: true
3640
with:
3741
timeout_minutes: 12
3842
max_attempts: 3
3943
command: npx cross-env TEST_ENV=integration npm run testFirefox
4044

4145
- name: Run Playwright mainview tests in Firefox
4246
uses: nick-fields/retry@v2
47+
id: firefoxMainview
48+
continue-on-error: true
4349
with:
4450
timeout_minutes: 12
4551
max_attempts: 3
4652
command: npx cross-env TEST_ENV=mainview npm run testFirefox
4753

4854
- name: Run Playwright livepreview tests in Firefox
4955
uses: nick-fields/retry@v2
56+
id: firefoxLivepreview
57+
continue-on-error: true
5058
with:
5159
timeout_minutes: 15
5260
max_attempts: 3
5361
command: npx cross-env TEST_ENV=livepreview npm run testFirefox
5462

5563
- name: Run Playwright LegacyInteg tests in Firefox
5664
uses: nick-fields/retry@v2
65+
id: firefoxLegacyInteg
66+
continue-on-error: true
5767
with:
5868
timeout_minutes: 20
5969
max_attempts: 3
6070
command: npx cross-env TEST_ENV=LegacyInteg npm run testFirefox
71+
72+
- name: Fail on test runs failed in Firefox Linux
73+
if: steps.firefoxUnit.outcome == 'failure' || steps.firefoxIntegration.outcome == 'failure' || steps.firefoxMainview.outcome == 'failure' || steps.firefoxLivepreview.outcome == 'failure' || steps.firefoxLegacyInteg.outcome == 'failure'
74+
run: |
75+
echo "Firefox Linux Playwright tests failed, marking step as failed"
76+
echo "Failed tests:"
77+
if [ "${{ steps.firefoxUnit.outcome }}" == "failure" ]; then
78+
echo "- Run Playwright unit tests in Firefox"
79+
fi
80+
if [ "${{ steps.firefoxIntegration.outcome }}" == "failure" ]; then
81+
echo "- Run Playwright integration tests in Firefox"
82+
fi
83+
if [ "${{ steps.firefoxMainview.outcome }}" == "failure" ]; then
84+
echo "- Run Playwright mainview tests in Firefox"
85+
fi
86+
if [ "${{ steps.firefoxLivepreview.outcome }}" == "failure" ]; then
87+
echo "- Run Playwright livepreview tests in Firefox"
88+
fi
89+
if [ "${{ steps.firefoxLegacyInteg.outcome }}" == "failure" ]; then
90+
echo "- Run Playwright LegacyInteg tests in Firefox"
91+
fi
92+
exit 1

0 commit comments

Comments
 (0)