File tree Expand file tree Collapse file tree 2 files changed +40
-125
lines changed Expand file tree Collapse file tree 2 files changed +40
-125
lines changed Original file line number Diff line number Diff line change 1+ name : Playwright Tests
2+
3+ on :
4+ deployment_status :
5+
6+ jobs :
7+ run-e2es :
8+ if : github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Checkout repository
12+ uses : actions/checkout@v4
13+
14+ - name : Install dependencies
15+ run : npm ci && npx playwright install --with-deps
16+
17+ - name : Run Playwright tests
18+ env :
19+ BASE_URL : ${{ github.event.deployment_status.environment_url }}
20+ run : npx playwright test
21+
22+ - name : Upload Playwright Report
23+ uses : actions/upload-artifact@v3
24+ if : always()
25+ with :
26+ name : playwright-report
27+ path : playwright-report/
28+ retention-days : 7
29+
30+ - name : GitHub Notification
31+ if : failure()
32+ uses : actions/github-script@v6
33+ with :
34+ script : |
35+ github.issues.createComment({
36+ issue_number: 1,
37+ owner: context.repo.owner,
38+ repo: context.repo.repo,
39+ body: "🚨 Playwright tests failed after deployment!"
40+ });
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments