File tree Expand file tree Collapse file tree 2 files changed +51
-19
lines changed Expand file tree Collapse file tree 2 files changed +51
-19
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+
9
+ env :
10
+ NODE_VERSION : ' 12.x'
11
+
12
+ jobs :
13
+ test :
14
+ name : Tests
15
+ runs-on : ubuntu-latest
16
+
17
+ steps :
18
+ - uses : actions/checkout@v2
19
+ with :
20
+ fetch-depth : 1
21
+
22
+ - uses : actions/setup-node@v2-beta
23
+ with :
24
+ node-version : ' ${{ env.NODE_VERSION }}'
25
+
26
+ - name : Get package manager's global cache path
27
+ id : global-cache-dir-path
28
+ run : echo "::set-output name=dir::$(yarn cache dir)"
29
+
30
+ - name : Cache package manager's global cache and node_modules
31
+ id : cache-dependencies
32
+ uses : actions/cache@v2
33
+ with :
34
+ path : |
35
+ ${{ steps.global-cache-dir-path.outputs.dir }}
36
+ node_modules
37
+ key : v1-${{ runner.os }}-${{ matrix.node-version }}-${{
38
+ hashFiles('**/yarn.lock'
39
+ ) }}
40
+ restore-keys : |
41
+ v1-${{ runner.os }}-${{ matrix.node-version }}-
42
+
43
+ - name : Install Dependencies
44
+ run : yarn install --no-lockfile
45
+ if : |
46
+ steps.cache-dependencies.outputs.cache-hit != 'true'
47
+
48
+ - name : Test
49
+ run : yarn test
50
+
51
+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments