-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (47 loc) · 1.36 KB
/
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
name: CI
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history
-
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: npm i -g [email protected]
- run: npm ci
- run: npm run check-node-version
- run: npm run standards
test:
needs: [ build ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ 16, 20, 'lts/*', 'latest' ]
steps:
- uses: actions/checkout@v4
-
name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci # Reinstall the dependencies to ensure they install with the node's version of npm
- run: npm test
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
parallel: true
flag-name: ${{ matrix.node-version }}
finish:
needs: [ test ]
runs-on: ubuntu-latest
steps:
- name: Close parallel build
uses: coverallsapp/github-action@v2
with:
parallel-finished: true