-
-
Notifications
You must be signed in to change notification settings - Fork 41
33 lines (32 loc) · 954 Bytes
/
build-and-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
name: Build and Test
on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'
jobs:
build_and_test:
name: Build and run tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14, 16, 18]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: docker build .crossbar -t wampy/crossbar
- run: docker run --rm --name crossbar -d -p 8888:8888 wampy/crossbar
- run: until docker logs crossbar | grep -qm 1 "NODE_BOOT_COMPLETE"; do sleep 0.2 ; done
- run: npm ci
- run: npm test
- name: Create test coverage report
run: ./node_modules/c8/bin/c8.js report --reporter=lcovonly
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}