Skip to content

Commit 570a79b

Browse files
add scheduled workflow for Playwright E2E tests
1 parent f709925 commit 570a79b

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/e2e-corn.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Scheduled Playwright Tests
2+
3+
on:
4+
schedule:
5+
- cron: "*/5 * * * *" # Runs every 5 minutes # Runs every 12 hours
6+
7+
defaults:
8+
run:
9+
working-directory: ./
10+
11+
permissions:
12+
contents: read # for checkout repository
13+
issues: write # for GitHub Notification
14+
15+
jobs:
16+
scheduled-e2e-tests:
17+
timeout-minutes: 35
18+
runs-on: ubuntu-latest
19+
name: Run Scheduled E2E Tests
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Install Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
30+
- name: Install Playwright
31+
run: npx exec playwright install
32+
33+
- name: Run E2E tests
34+
env:
35+
NEXT_PUBLIC_URL: https://e2e-nextjs-vercel-e1mnjlrul-nandinis-projects-ce9532aa.vercel.app/ # Fixed URL
36+
run: |
37+
npx playwright test || echo "Tests failed" > test-failure.log
38+
39+
- name: Upload Playwright Report
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: reports
43+
path: tests/reports/
44+
retention-days: 7

0 commit comments

Comments
 (0)