-
Notifications
You must be signed in to change notification settings - Fork 73
50 lines (41 loc) · 1.09 KB
/
npm_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
# This workflow will run tests using node.
name: Run NodeJS Tests
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Run on every push.
push:
# Run on every pull request.
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Note: Node 20.8 introduces a change which breaks mock-fs.
# https://github.com/tschaub/mock-fs/issues/380
node: [ 10, 12, 14, 16, 18, 20.7 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# Clean install of all dependencies.
- run: npm ci
# Run the tests
- run: npm test
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true