Skip to content

Coverage

Coverage #91

Workflow file for this run

name: Coverage
on:
push:
pull_request:
workflow_dispatch:
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install packages
run: |
sudo apt update
sudo apt install cmake zlib1g-dev libpcre2-dev clang lcov libcunit1-dev
- name: Set up CMake
uses: lukka/run-cmake@v1
- name: Build
run: cmake -DCOVERAGE=ON -DBUILD_TESTS=ON .
- name: Test
run: make coverage
- name: Generate Coverage Report
run: lcov --directory . --capture --output-file coverage.info
- name: Set up Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.info
- name: Upload Coverage Report
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ${{github.workspace}}/coverage.info