-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (39 loc) · 1.61 KB
/
node.js.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/
axios-version: [^0.18.0, ^0.19.0, ^0.20.0, ^0.21.0, ^0.22.0, ^0.23.0, ^0.24.0, ^0.25.0, ^0.26.0, ^0.27.0]
node-cache-version: [^4.1.1, ^5.0.0]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- name: Install Supported Not-Always-Latest Dependencies
run: npm install "axios@${{ matrix.axios-version }}" "node-cache@${{ matrix.node-cache-version }}" --no-save
- run: npm test
- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: tests/coverage/lcov.info
flag-name: run-${{ matrix.node_version }}-${{ matrix.axios-version}}-${{ matrix.node-cache-version }}
parallel: true
finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: tests/coverage/lcov.info
parallel-finished: true