Skip to content

ci: Fix codecov upload (#52) #39

ci: Fix codecov upload (#52)

ci: Fix codecov upload (#52) #39

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '12', '14', '15', '16', '17', '18' ]
timeout-minutes: 30
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERAGE_OPTION: ./node_modules/.bin/nyc
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Cache Node.js modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run coverage
env:
CI: true
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}