-
-
Notifications
You must be signed in to change notification settings - Fork 18
44 lines (41 loc) · 1008 Bytes
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
jobs:
test_matrix:
runs-on: ubuntu-latest
strategy:
matrix:
node_version:
- 16
- 18
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: npm
- run: npm ci
- run: npm run test:code
test:
runs-on: ubuntu-latest
needs: test_matrix
# prevent to be taken as pass when `test_matrix` was not picked up yet
if: ${{ always() }}
steps:
- run: exit 1
if: ${{ needs.test_matrix.result != 'success' }}
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: npm
- run: npm ci
- run: npm run test:tsc
- run: npm run test:tsd
- run: npm run lint