Skip to content

Use c8 for code coverage #109

Use c8 for code coverage

Use c8 for code coverage #109

Workflow file for this run

# This workflow will do a clean install of node dependencies,
# run tests across different versions of node with coverage reports,
# and emit the report to Coveralls.
# 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, release/5.x ]
pull_request:
branches: [ master, release/5.x ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, lts/*, latest]
# Minimum supported version, latest LTS, and latest stable
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
# only lint on current LTS version
- if: ${{ matrix.node-version == 'lts/*' }}
run: npm run strictCheck
- run: npm run cover
# use LTS version to report to coveralls
- name: Coveralls
uses: coverallsapp/github-action@master
if: ${{ matrix.node-version == 'lts/*' }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}