-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (39 loc) · 995 Bytes
/
front-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
name: "jest test"
on:
pull_request:
branches: [dev-fe, dev]
paths:
- "frontend/**"
jobs:
test:
name: Run Test
runs-on: ubuntu-latest
outputs:
result: ${{ steps.test1.outputs.result}}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: "**/node_modules"
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
cd frontend
yarn install --frozen-lockfile
- name: Run Test
id: test1
run: |
cd frontend
yarn test
echo "result=테스트실행!" >> $GITHUB_OUTPUT