-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (52 loc) · 1.51 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Test
on:
push:
paths-ignore:
- 'docs/**'
- '*.md'
schedule:
- cron: '0 20 * * *'
jobs:
test:
name: test on ${{ matrix.os-release }} node@${{ matrix.node-version }}
runs-on: ${{ matrix.os-release }}
strategy:
matrix:
node-version:
- 18
- 20
- 21
os-release:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
persist-credentials: false
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run test
coverage:
name: collect coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
persist-credentials: false
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
with:
node-version-file: 'package.json'
- run: npm ci
- run: npm run test:unit
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unit
- run: rm -rf coverage
- run: npm run test:integration
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: integration