-
Notifications
You must be signed in to change notification settings - Fork 13
57 lines (44 loc) · 1.23 KB
/
github-ci.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
name: GitHub CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: General checks, tests and coverage reporting
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Use Node.js LTS 20.11.0
uses: actions/[email protected]
with:
node-version: 20.11.0
- name: Install dependencies
run: npm ci
- name: Perform checks and tests
run: npm test
- name: Send report to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
test-matrix:
name: Unit tests on Node.js ${{ matrix.node-version }} and ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [20, 22]
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
name: Install dependencies
- run: npm ls --prod
name: Check for missing / extraneous Dependencies
- run: npm run unit
name: Run unit tests