File tree 6 files changed +23
-15
lines changed
6 files changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -3,22 +3,26 @@ on: ["push", "pull_request"]
3
3
4
4
jobs :
5
5
test :
6
- name : Build and test
7
- runs-on : ubuntu-20.04
6
+ name : Test
7
+ runs-on : ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ node : [14, 16]
8
11
steps :
9
12
- uses : actions/checkout@v1
10
13
11
- - name : Use Node.js 16
14
+ - name : Use Node.js ${{ matrix.node }}
12
15
uses : actions/setup-node@v1
13
16
with :
14
- node-version : 16
17
+ node-version : ${{ matrix.node }}
15
18
16
19
- name : Test and generate coverage
17
20
run : |
18
21
npm ci
19
- npm run test:prod
22
+ npm run test:ci
20
23
21
24
- name : Coveralls
25
+ if : matrix.node == 16
22
26
uses : coverallsapp/github-action@master
23
27
with :
24
28
github-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
. " $( dirname " $0 " ) /_/husky.sh"
3
3
4
- npm run test:prod && npm run build
4
+ npm run test:ci && npm run build
Original file line number Diff line number Diff line change 24
24
},
25
25
"license" : " MIT" ,
26
26
"engines" : {
27
- "node" : " >=16 .0.0"
27
+ "node" : " >=14 .0.0"
28
28
},
29
29
"scripts" : {
30
30
"lint" : " eslint --fix 'src/**/*.ts'" ,
31
31
"prebuild" : " rimraf lib" ,
32
32
"build" : " tsc --project tsconfig.build.json" ,
33
33
"build:docs" : " typedoc --out docs src/create-ts-lib-gh.ts" ,
34
34
"test" : " jest --config jest.config.ts --coverage" ,
35
- "test:prod " : " npm run lint && npm run test -- --no-cache"
35
+ "test:ci " : " npm run lint && npm run test -- --no-cache"
36
36
},
37
37
"lint-staged" : {
38
38
"{src,test}/**/*.ts" : [
Original file line number Diff line number Diff line change @@ -3,22 +3,26 @@ on: ["push", "pull_request"]
3
3
4
4
jobs :
5
5
test :
6
- name : Build and test
7
- runs-on : ubuntu-20.04
6
+ name : Test
7
+ runs-on : ubuntu-latest
8
+ strategy :
9
+ matrix :
10
+ node : [14, 16]
8
11
steps :
9
12
- uses : actions/checkout@v1
10
13
11
- - name : Use Node.js 16
14
+ - name : Use Node.js ${{ matrix.node }}
12
15
uses : actions/setup-node@v1
13
16
with :
14
- node-version : 16
17
+ node-version : ${{ matrix.node }}
15
18
16
19
- name : Test and generate coverage
17
20
run : |
18
21
npm ci
19
- npm run test:prod
22
+ npm run test:ci
20
23
21
24
- name : Coveralls
25
+ if : matrix.node == 16
22
26
uses : coverallsapp/github-action@master
23
27
with :
24
28
github-token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
. " $( dirname " $0 " ) /_/husky.sh"
3
3
4
- npm run test:prod && npm run build
4
+ npm run test:ci && npm run build
Original file line number Diff line number Diff line change 25
25
"build" : " tsc --project tsconfig.build.json" ,
26
26
"build:docs" : " typedoc --out docs src/<%= str(library.name) %>.ts" ,
27
27
"test" : " jest --config jest.config.ts --coverage" ,
28
- "test:prod " : " npm run lint && npm run test -- --no-cache"
28
+ "test:ci " : " npm run lint && npm run test -- --no-cache"
29
29
},
30
30
"lint-staged" : {
31
31
"{src,test}/**/*.ts" : [
You can’t perform that action at this time.
0 commit comments