Skip to content

Commit ec42085

Browse files
feat: add manual Playwright tests workflow for end-to-end testing
1 parent fc079a5 commit ec42085

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/manual-e2e.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Playwright Tests Manual
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
preview_url:
7+
description: "Deployment preview URL"
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
issues: write
14+
15+
jobs:
16+
run-e2es:
17+
timeout-minutes: 35
18+
runs-on: ubuntu-latest
19+
name: Run E2E tests
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
24+
- name: Install dependencies
25+
run: npm ci && npx playwright install --with-deps
26+
27+
- name: Run E2E tests
28+
env:
29+
NEXT_PUBLIC_URL: ${{ inputs.preview_url }}
30+
run: |
31+
npx playwright test || echo "Tests failed" > test-failure.log
32+
33+
- name: Upload Playwright Report
34+
if: always()
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: reports
38+
path: packages/dashboard/playwright/reports/
39+
retention-days: 7
40+
- name: Slack Notification on Failure
41+
if: failure()
42+
run: |
43+
curl -X POST -H 'Content-type: application/json' \
44+
--data '{"text":"🚨 Playwright tests failed after deployment to '${{ github.event.deployment_status.environment }}'. Check the reports for details."}' \
45+
${{ secrets.SLACK_WEBHOOK_URL }}

0 commit comments

Comments
 (0)