Skip to content

Commit 5228e3b

Browse files
committed
feat: github action run the e2e
1 parent c160fb0 commit 5228e3b

1 file changed

Lines changed: 14 additions & 19 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,32 @@ on:
77

88
jobs:
99
e2e:
10-
name: Run Playwright Tests
1110
runs-on: ubuntu-latest
1211

13-
services:
14-
web:
15-
image: node:20
16-
options: --health-cmd "curl -f http://localhost:3333 || exit 1" --health-interval 10s --health-timeout 5s --health-retries 5
17-
1812
steps:
19-
- name: Checkout code
20-
uses: actions/checkout@v3
13+
- name: ⬇️ Checkout repository
14+
uses: actions/checkout@v4
2115

22-
- name: Setup Node.js
23-
uses: actions/setup-node@v3
16+
- name: ⚙️ Setup Node.js 20
17+
uses: actions/setup-node@v4
2418
with:
2519
node-version: 20
20+
cache: yarn
2621

27-
- name: Install dependencies
22+
- name: 📦 Install dependencies (Yarn)
2823
run: yarn install
2924

30-
- name: Build project
31-
run: yarn run build
25+
- name: 🔨 Build Next.js app
26+
run: yarn build
3227

33-
- name: Start app in background
34-
run: yarn run start &
28+
- name: 🚀 Start app in background on port 3333
29+
run: PORT=3333 yarn start &
3530

36-
- name: Wait for app
31+
- name: Wait for app to be ready
3732
run: npx wait-on http://localhost:3333
3833

39-
- name: Install Playwright browsers
34+
- name: 🌐 Install Playwright browsers
4035
run: npx playwright install --with-deps
4136

42-
- name: Run Playwright tests
43-
run: yarn run test:e2e
37+
- name: Run Playwright E2E tests
38+
run: yarn test:e2e

0 commit comments

Comments
 (0)