Skip to content

Generate code coverage reports and upload to Codecov #2450

Generate code coverage reports and upload to Codecov

Generate code coverage reports and upload to Codecov #2450

Workflow file for this run

name: actions
on: [push, pull_request]
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install && npm test && npm run lint
env:
CI: true
codecov:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install deps
run: npm install
- name: Generate coverage report
run: npm run test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}