Repository navigation
67 lines (53 loc) · 1.58 KB
/
Copy pathci.yml
File metadata and controls
67 lines (53 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: CI
on:
push:
branches: [main]
pull_request:
# 실패한 실행을 다시 돌리거나 기본 브랜치를 수동으로 검증할 때 사용한다.
workflow_dispatch:
# 같은 브랜치에 새 커밋이 오면 진행 중이던 실행을 취소한다.
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
verify:
name: Lint, typecheck, test, build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6
# packageManager 필드(pnpm@11.9.0)에서 버전을 읽으므로 별도 고정이 필요 없다.
- name: Set up pnpm
uses: pnpm/action-setup@v5
# package.json 의 engines 와 같은 메이저를 쓴다.
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: "22"
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Typecheck
run: pnpm typecheck
- name: Test
run: pnpm test
- name: Build
run: pnpm build
env:
NEXT_PUBLIC_SITE_URL: https://example.invalid
- name: Install test browser
run: pnpm exec playwright install --with-deps chromium
- name: Browser smoke tests
run: pnpm test:e2e
- name: Preserve browser failure traces
if: failure()
uses: actions/upload-artifact@v4
with:
name: browser-test-results
path: test-results/
retention-days: 7