Skip to content

feat: setup test coverage #7

feat: setup test coverage

feat: setup test coverage #7

Workflow file for this run

name: Build and Test Zolt
on:
- push
- pull_request
jobs:
build:
name: With Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 20
- 18
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
run: pnpm install
- name: Build the project
run: pnpm run build
- name: Run tests with coverage
run: pnpm run test:coverage
- name: Merge coverage reports
run: pnpm exec c8 report --reporter=json
- name: Send coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage-final.json
flags: unittests
fail_ci_if_error: true