-
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (50 loc) · 1.5 KB
/
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
51
name: Test
on:
push:
branches: [ latest ]
pull_request:
branches: [ latest ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12.x, 14.x, 16.x]
# Test with oldest and newest supported boardgame.io versions
bgio: [0.41.1, latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Cache Node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}-
${{ runner.os }}-
- name: Install npm dependencies
run: npm ci
- name: Install boardgame.io@${{ matrix.bgio }}
run: npm i -D boardgame.io@${{ matrix.bgio }}
- run: npm test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
flag-name: test-node@${{ matrix.node }}-bgio@${{ matrix.bgio }}
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: ./coverage/lcov.info
onEnd:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
path-to-lcov: ./coverage/lcov.info