Skip to content

Commit

Permalink
Fail the Deploy if Playwright fails
Browse files Browse the repository at this point in the history
  • Loading branch information
benmartin-coforma committed Dec 3, 2024
1 parent 2e4ab3d commit ecd33e5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ jobs:
working-directory: tests
- name: Run Playwright tests
run: yarn playwright test
id: run_playwright_tests
working-directory: tests
continue-on-error: true
env:
Expand All @@ -246,6 +247,8 @@ jobs:
# path: playwright-report/index.html # path on runner
path: tests/playwright-report # path on runner
retention-days: 30
outputs:
test_outcome: steps.run_playwright_tests.outcome

upload-reports:
name: Upload Reports
Expand Down Expand Up @@ -324,3 +327,8 @@ jobs:
env:
AWS_RETRY_MODE: adaptive
AWS_MAX_ATTEMPTS: 10
- name: Fail if tests did not pass
if: ${{ needs.test.outputs.test_outcome != 'success' }}
run: |
echo "End-to-end tests in the deployed environment were not successful."
exit 1

0 comments on commit ecd33e5

Please sign in to comment.