.github/workflows/node.js.yml
# 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:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: sudo apt-get update
- run: sudo apt-get install build-essential git -y
- run: sudo apt-get install libudev-dev -y
- run: sudo apt-get install libusb-1.0-0-dev -y
- run: sudo apt-get install gcc-4.8 g++-4.8 -y
- run: yarn install --frozen-lockfile
- run: yarn test
coverage:
needs: [ build ]
name: coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: '12'
- run: sudo apt-get update
- run: sudo apt-get install build-essential git -y
- run: sudo apt-get install libudev-dev -y
- run: sudo apt-get install libusb-1.0-0-dev -y
- run: sudo apt-get install gcc-4.8 g++-4.8 -y
- run: yarn install --frozen-lockfile
- uses: paambaati/codeclimate-action@v2.7.4
env:
CC_TEST_REPORTER_ID: c0e9c3e4feb7d67fb4221428b2efb0c2745ff27c69fb76ba4965b4319040b4d5
with:
coverageCommand: yarn test
coverageLocations: ${{github.workspace}}/lib/coverage/lcov.info:lcov