Skip to content

Commit 70e96d6

Browse files
Test if recognizes test failure
1 parent 0cf9873 commit 70e96d6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/playwright.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,19 @@ jobs:
2424
- name: Install Playwright Browsers
2525
run: npx playwright install --with-deps
2626

27-
- name: Build app
27+
- name: Build app and run tests
28+
id: test-status
2829
run: npm run test:ci:integration
2930

31+
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-status-check-functions
32+
# - name: Set successful workflow status ✅
33+
# if: contains(steps.test-status.outputs.test, 'error')
34+
# run: # success
35+
36+
- name: Set failure workflow status 🚨
37+
if: contains(steps.test-status.outputs.test, 'error')
38+
run: echo 'failure' # failure
39+
3040
- name: Upload Playwright report
3141
uses: actions/upload-artifact@v4
3242
if: ${{ !cancelled() }}

0 commit comments

Comments
 (0)