-
-
Notifications
You must be signed in to change notification settings - Fork 21
40 lines (40 loc) · 1.11 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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Restore cached dependencies
uses: actions/cache@v1
with:
path: node_modules
key: node-modules-${{ hashFiles('package.json') }}
- name: Install dependencies
run: npm install
- name: Run Tests
run: npm test
- name: Coveralls Parallel
uses: coverallsapp/[email protected]
with:
flag-name: run-${{ matrix.os }}-${{ matrix.node-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true