fix nyc coverage report with node8 ci #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: unit test | |
on: | |
push: | |
branches: [master, dev, ci/**] | |
pull_request: | |
branches: [master, dev, ci/**] | |
workflow_dispatch: | |
# Keep this to allow for triggering manually | |
jobs: | |
unit-test: | |
strategy: | |
matrix: | |
node-version: | |
# currently devDependencies require node>=8.9 | |
- 8 | |
- 10 | |
# - 12 # skip | |
# - 14 # skip | |
# - 16 # skip | |
# - 18 # skip | |
os: | |
- windows-latest | |
- ubuntu-latest | |
- macos-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install | |
run: npm install | |
- name: Fix nyc coverage report with node8 | |
run: > | |
npm install --no-save | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
- name: Test | |
run: npm test | |
- name: Update Coverage Badge | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == 8 }} | |
uses: we-cli/coverage-badge-action@main |