File tree Expand file tree Collapse file tree 3 files changed +47
-11
lines changed Expand file tree Collapse file tree 3 files changed +47
-11
lines changed Original file line number Diff line number Diff line change
1
+ name : Test and Build
2
+
3
+ on : [push]
4
+
5
+ jobs :
6
+ test :
7
+ runs-on : ubuntu-latest
8
+
9
+ strategy :
10
+ matrix :
11
+ node-version : [14.x, 16.x]
12
+
13
+ steps :
14
+ - uses : actions/checkout@v1
15
+ - name : Use Node.js ${{ matrix.node-version }}
16
+ uses : actions/setup-node@v1
17
+ with :
18
+ node-version : ${{ matrix.node-version }}
19
+ - run : npm i
20
+ - run : npm run build
21
+ - run : npm test
Original file line number Diff line number Diff line change @@ -19,13 +19,12 @@ jobs:
19
19
uses : actions/setup-node@v1
20
20
with :
21
21
node-version : ${{ matrix.node-version }}
22
-
23
- - name : npm install and test
24
- run : |
25
- npm install
26
- npm test
22
+ - run : npm i
23
+ - run : npm run build
24
+ - run : npm test
27
25
28
26
release :
27
+ if : github.event.base_ref == 'refs/heads/master'
29
28
runs-on : ubuntu-latest
30
29
needs : test
31
30
steps :
Original file line number Diff line number Diff line change 1
1
name : Deploy example on vercel
2
- on : [push]
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
3
8
jobs :
4
- deploy :
9
+ test :
5
10
runs-on : ubuntu-latest
11
+
12
+ strategy :
13
+ matrix :
14
+ node-version : [14.x, 16.x]
15
+
6
16
steps :
7
- - uses : actions/checkout@v2
8
- - uses : actions/setup-node@v1
17
+ - uses : actions/checkout@v1
18
+ - name : Use Node.js ${{ matrix.node-version }}
19
+ uses : actions/setup-node@v1
9
20
with :
10
- node-version : ' 14'
11
- - run : npm install
21
+ node-version : ${{ matrix.node-version }}
22
+ - run : npm i
23
+ - run : npm run build
12
24
- run : npm test
13
25
26
+ deploy :
27
+ runs-on : ubuntu-latest
28
+ needs : test
29
+ steps :
14
30
- name : build
15
31
run : |
16
32
cd example
You can’t perform that action at this time.
0 commit comments