1
1
name : Tests
2
2
3
- on :
4
- push :
5
- branches : [master]
6
- pull_request :
7
- branches : [master]
8
- workflow_dispatch :
3
+ on : [push, pull_request, workflow_dispatch]
9
4
10
5
jobs :
11
6
build :
12
- name : Test Suite
7
+ name : Build and run test Suite
13
8
runs-on : ubuntu-latest
14
9
15
10
steps :
25
20
- name : Install dependencies
26
21
run : yarn install
27
22
23
+ - name : Run test suite
24
+ run : yarn test
25
+
28
26
- name : Collect coverage
29
27
run : yarn coverage
30
28
39
37
name : package
40
38
path : ./package.tgz
41
39
42
- test-dist :
43
- name : Test against dist
44
- needs : [build]
45
- runs-on : ubuntu-latest
46
- strategy :
47
- fail-fast : false
48
- matrix :
49
- node : ['20.x']
50
- steps :
51
- - name : Checkout repo
52
- uses : actions/checkout@v4
53
-
54
- - name : Use node ${{ matrix.node }}
55
- uses : actions/setup-node@v4
56
- with :
57
- node-version : ${{ matrix.node }}
58
- cache : ' yarn'
59
-
60
- - name : Install deps
61
- run : yarn install
62
-
63
- - uses : actions/download-artifact@v4
64
- with :
65
- name : package
66
- path : .
67
-
68
- - run : ls -lah
69
-
70
- - name : Install build artifact
71
- run : yarn add ./package.tgz
72
-
73
- - run : sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts
74
-
75
- - name : Run tests, against dist
76
- run : yarn test
77
-
78
40
test-types :
79
41
name : Test Types with TypeScript ${{ matrix.ts }}
80
42
@@ -96,12 +58,24 @@ jobs:
96
58
node-version : ${{ matrix.node }}
97
59
cache : ' yarn'
98
60
61
+ - name : Download build artifact
62
+ uses : actions/download-artifact@v4
63
+ with :
64
+ name : package
65
+ path : .
66
+
99
67
- name : Install deps
100
68
run : yarn install
101
69
102
70
- name : Install TypeScript ${{ matrix.ts }}
103
71
run : yarn add typescript@${{ matrix.ts }}
104
72
73
+ - name : Install build artifact
74
+ run : yarn add ./package.tgz
75
+
76
+ - name : Erase path aliases
77
+ run : sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts
78
+
105
79
- name : Test types
106
80
run : |
107
81
yarn tsc --version
@@ -252,3 +226,42 @@ jobs:
252
226
253
227
- name : Build example
254
228
run : yarn build
229
+
230
+ test-dist :
231
+ name : Run local tests against build artifact
232
+ needs : [build]
233
+ runs-on : ubuntu-latest
234
+ strategy :
235
+ fail-fast : false
236
+ matrix :
237
+ node : ['20.x']
238
+ steps :
239
+ - name : Checkout repo
240
+ uses : actions/checkout@v4
241
+
242
+ - name : Use node ${{ matrix.node }}
243
+ uses : actions/setup-node@v4
244
+ with :
245
+ node-version : ${{ matrix.node }}
246
+ cache : ' yarn'
247
+
248
+ - name : Install deps
249
+ run : yarn install
250
+
251
+ - name : Download build artifact
252
+ uses : actions/download-artifact@v4
253
+ with :
254
+ name : package
255
+ path : .
256
+
257
+ - name : Check folder contents
258
+ run : ls -lah
259
+
260
+ - name : Install build artifact
261
+ run : yarn add ./package.tgz
262
+
263
+ - name : Erase path aliases
264
+ run : sed -i -e /@remap-prod-remove-line/d ./tsconfig.base.json ./vitest.config.mts
265
+
266
+ - name : Run local tests against the build artifact
267
+ run : yarn test
0 commit comments