-
Notifications
You must be signed in to change notification settings - Fork 69
41 lines (37 loc) · 971 Bytes
/
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
name: Build Test
on:
push:
pull_request:
paths-ignore:
- '**/node_modules/**'
- '.github/**'
- '.github/*'
branches-ignore:
- renovate*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
node-version: 16
# yarn cache
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Restore yarn cache
uses: actions/[email protected]
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
restore-keys: |
yarn-cache-folder-
# execute commands
- run: yarn
- run: yarn lint
- run: yarn build
- name: Run tests
run: |
yarn test