Skip to content

Upload Test Coverage #35

Upload Test Coverage

Upload Test Coverage #35

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them,
# lint, build the source code, run tests on one version of node, and upload coverage data.
# For more information see:
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Upload Test Coverage
on:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
upload-coverage:
name: Upload Coverage
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install
run: npm clean-install --progress=false --no-fund
# - name: Lint
# run: npm run lint --if-present
# - name: Build
# run: npm run build --if-present
- name: Test
run: npm run test-coverage -- --coverage.reporter=json
- name: Upload coverage reports to Codecov
if: ${{ success() }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}