Skip to content

add codecoverage

add codecoverage #22

Workflow file for this run

name: parcom ci
on:
push:
branches:
- main
pull_request:
paths-ignore:
- 'LICENSE'
- 'README.md'
jobs:
test:
name: Build, Test and Check coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Install zig
uses: mlugg/setup-zig@v2
- name: Zig build test
run: zig build test --summary all
- name: Run test with kcov coverage
uses: sudo-bot/action-kcov@latest
with:
cli-args: "--dump-summary ./coverage ./zig-out/bin/test"
- name: Upload results to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/
fail_ci_if_error: true