8
8
9
9
jobs :
10
10
build :
11
- name : Test Suite
11
+ name : Lint, Test, Build & Pack on Node ${{ matrix.node }}
12
12
runs-on : ubuntu-latest
13
+ strategy :
14
+ matrix :
15
+ node : ['16.x']
13
16
14
17
steps :
15
- - name : Checkout code
18
+ - name : Checkout repo
16
19
uses : actions/checkout@v2
17
20
18
- - name : Set up Node
21
+ - name : Use Node ${{ matrix.node }}
19
22
uses : actions/setup-node@v2
20
23
with :
21
- node-version : 16.x
22
- cache : ' npm '
24
+ node-version : ${{ matrix.node }}
25
+ cache : ' yarn '
23
26
24
27
- name : Install deps
25
- run : npm ci --ignore-scripts
28
+ run : yarn install
29
+
30
+ # Read existing version, reuse that, add a Git short hash
31
+ # - name: Set build version to Git commit
32
+ # run: node scripts/writeGitVersion.js $(git rev-parse --short HEAD)
33
+
34
+ # - name: Check updated version
35
+ # run: jq .version package.json
26
36
27
37
- name : Run linter
28
- run : npm run lint
38
+ run : yarn lint
29
39
30
40
- name : Run tests
31
- run : npm test
41
+ run : yarn test
32
42
33
43
- name : Compile
34
- run : npm run build
44
+ run : yarn build
45
+
46
+ - name : Pack
47
+ run : yarn pack
48
+
49
+ - uses : actions/upload-artifact@v2
50
+ with :
51
+ name : package
52
+ path : packages/toolkit/package.tgz
35
53
36
54
test-types :
37
55
name : Test Types with TypeScript ${{ matrix.ts }}
@@ -41,25 +59,26 @@ jobs:
41
59
strategy :
42
60
fail-fast : false
43
61
matrix :
44
- ts : ['4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9']
62
+ node : ['16.x']
63
+ ts : ['4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9', '5.0']
45
64
46
65
steps :
47
- - name : Checkout code
66
+ - name : Checkout repo
48
67
uses : actions/checkout@v2
49
68
50
- - name : Set up Node
69
+ - name : Use node ${{ matrix.node }}
51
70
uses : actions/setup-node@v2
52
71
with :
53
- node-version : 14.x
54
- cache : ' npm '
72
+ node-version : ${{ matrix.node }}
73
+ cache : ' yarn '
55
74
56
75
- name : Install deps
57
- run : npm ci --ignore-scripts
76
+ run : yarn install
58
77
59
78
- name : Install TypeScript ${{ matrix.ts }}
60
- run : npm install typescript@${{ matrix.ts }} --ignore-scripts
79
+ run : yarn add typescript@${{ matrix.ts }}
61
80
62
81
- name : Test types
63
82
run : |
64
- ./node_modules/.bin/ tsc --version
65
- npm run test:typescript
83
+ yarn tsc --version
84
+ yarn test:typescript
0 commit comments