-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (40 loc) · 1.06 KB
/
ci.yml
File metadata and controls
49 lines (40 loc) · 1.06 KB
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
name: CI
on:
push:
branches:
- master
pull_request:
env:
NODE_VERSION: '12.x'
jobs:
test:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v2-beta
with:
node-version: '${{ env.NODE_VERSION }}'
- name: Get package manager's global cache path
id: global-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache package manager's global cache and node_modules
id: cache-dependencies
uses: actions/cache@v2
with:
path: |
${{ steps.global-cache-dir-path.outputs.dir }}
node_modules
key: v1-${{ runner.os }}-${{ matrix.node-version }}-${{
hashFiles('**/yarn.lock'
) }}
restore-keys: |
v1-${{ runner.os }}-${{ matrix.node-version }}-
- name: Install Dependencies
run: yarn install --no-lockfile
if: |
steps.cache-dependencies.outputs.cache-hit != 'true'
- name: Test
run: yarn test