-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (87 loc) · 2.2 KB
/
ci-check.yml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: CI-check
run-name: CI by @${{ github.actor }}
on:
pull_request:
branches:
- main
- develop
types:
- opened
- synchronize
- reopened
- ready_for_review
permissions:
pull-requests: write
contents: read
jobs:
setup:
name: CI 작업 세팅
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: 체크아웃
uses: actions/checkout@v4
- name: node 세팅
uses: actions/setup-node@v4
with:
node-version: '20.15.1'
npm: '10.8.1'
- name: 의존성 캐싱
uses: actions/cache@v3
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-nodekey-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-nodekey-
- if: ${{ steps.npm-cache.outputs.cache-hit != 'true' }}
run: npm install
lint:
name: lint 체크
timeout-minutes: 10
runs-on: ubuntu-latest
needs: setup
steps:
- name: 체크아웃
uses: actions/checkout@v4
- name: node 세팅
uses: actions/setup-node@v4
with:
node-version: '20.15.1'
npm: '10.8.1'
- name: 의존성 캐싱
uses: actions/cache@v3
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-nodekey-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-nodekey-
- name: ESLint 실행
run: npm run lint
type-check:
name: 타입 체킹
timeout-minutes: 10
runs-on: ubuntu-latest
needs: setup
steps:
- name: 체크아웃
uses: actions/checkout@v4
- name: node 세팅
uses: actions/setup-node@v4
with:
node-version: '20.15.1'
npm: '10.8.1'
- name: 의존성 캐싱
uses: actions/cache@v3
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-nodekey-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-nodekey-
- name: 타입 체크
run: npm run type-check