Skip to content

Commit 7a6cc10

Browse files
committed
chore: ci - e2e 추가
1 parent fcb6037 commit 7a6cc10

File tree

1 file changed

+29
-9
lines changed

1 file changed

+29
-9
lines changed

.github/workflows/ci.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
name: CI
22

33
on:
4-
pull_request_target:
5-
types:
6-
- synchronize
7-
- opened
8-
- reopened
9-
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
108
workflow_dispatch:
119

1210
jobs:
@@ -28,7 +26,7 @@ jobs:
2826
run: |
2927
pnpm install
3028
pnpm run lint
31-
test:
29+
vitest:
3230
runs-on: ubuntu-latest
3331
steps:
3432
- uses: actions/checkout@v3
@@ -42,7 +40,29 @@ jobs:
4240
with:
4341
node-version: 20
4442
cache: 'pnpm'
45-
- name: test basic
43+
- name: run unit & integration tests
44+
run: |
45+
pnpm install
46+
pnpm run test
47+
48+
e2e:
49+
runs-on: ubuntu-latest
50+
needs: vitest
51+
steps:
52+
- uses: actions/checkout@v3
53+
with:
54+
fetch-depth: 0
55+
ref: ${{ github.event.pull_request.head.sha }}
56+
- uses: pnpm/action-setup@v4
57+
with:
58+
version: latest
59+
- uses: actions/setup-node@v4
60+
with:
61+
node-version: 20
62+
cache: 'pnpm'
63+
- name: Install deps & Playwright browsers
4664
run: |
4765
pnpm install
48-
pnpm run test
66+
pnpm exec playwright install --with-deps
67+
- name: Run E2E tests
68+
run: pnpm run test:e2e

0 commit comments

Comments
 (0)