-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.1 KB
/
build-test.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
name: Build Test
on: pull_request
jobs:
lint-check:
name: Build Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Cache .yarn/unplugged Directory
uses: actions/cache@v3
with:
path: .yarn/unplugged
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Check for Cached .yarn/unplugged
id: yarn-cache-check
run: |
if [ -d .yarn/unplugged ]; then
echo "Yarn Cache found!"
echo "yarn-cache-hit=true" >> $GITHUB_ENV
fi
- name: Install Dependencies
run: |
if [ ${{ env.yarn-cache-hit }} != 'true' ]; then
echo "Installing all dependencies..."
yarn install
else
echo "Restoring .yarn/unplugged from cache..."
# .yarn/unplugged 종속성들은 캐싱
yarn install --immutable
fi
- name: Run Build
run: yarn build