-
-
Notifications
You must be signed in to change notification settings - Fork 41
39 lines (37 loc) · 1.05 KB
/
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
34
35
36
37
38
name: Build and Test
on:
push:
branches:
- dev
- master
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: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
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 }}
parallel: true
flag-name: run ${{ join(matrix.*, ' - ') }}