-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 989 Bytes
/
test.yaml
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
on:
pull_request: {}
workflow_call:
name: Test
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ^20.4.0
cache: yarn
cache-dependency-path: yarn.lock
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: |
echo dir="$(yarn cache dir)" >> $GITHUB_OUTPUT
echo version="$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: |
**/node_modules
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-braekhus-${{ steps.yarn-cache-dir-path.outputs.version }}-${{ hashFiles('**/yarn.lock') }}
- name: Yarn install
run: yarn install --frozen-lockfile
- name: Yarn unit test
run: yarn test -w=1
- name: Yarn compile
run: yarn build