File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ path-ignore :
6
+ - ' **/*.md'
7
+ pull_request :
8
+ branches :
9
+ - master
10
+ path-ignore :
11
+ - ' **/*.md'
12
+
13
+ jobs :
14
+ build-and-test :
15
+ name : Build and Test
16
+ runs-on : ubuntu-latest
17
+ strategy :
18
+ matrix :
19
+ node : [10, 12]
20
+
21
+ steps :
22
+ - uses : actions/checkout@v2
23
+
24
+ - uses : actions/setup-node@v1
25
+ with :
26
+ node-version : ${{ matrix.node }}
27
+
28
+ - name : Get yarn cache directory path
29
+ id : yarn-cache-dir-path
30
+ run : echo "::set-output name=dir::$(yarn cache dir)"
31
+
32
+ - uses : actions/cache@v1
33
+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
34
+ with :
35
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
36
+ key : ${{ runner.os }}-node${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
37
+ restore-keys : |
38
+ ${{ runner.os }}-node${{ matrix.node}}-yarn-
39
+
40
+ - name : Install dependencies
41
+ run : yarn --frozen-lockfile
42
+
43
+ - name : Run unit tests
44
+ run : yarn test:ci:unit
45
+
46
+ - name : Lint
47
+ run : yarn lint
48
+
49
+ - name : Build
50
+ run : yarn build
You can’t perform that action at this time.
0 commit comments