Skip to content

create coverage actions #22

create coverage actions

create coverage actions #22

Workflow file for this run

name: Coveralls Report
on: ["push", "pull_request"]
jobs:
test-coverage:
runs-on: ubuntu-22.04
steps:
- name: Install apt packages
run: sudo apt-get install -y build-essential cmake git uuid-dev faketime locales python3 curl gcovr ninja-build
- name: Check out this repository
uses: actions/checkout@v4.1.6
- name: Build project
run: |
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS=--coverage
cmake --build build --target build_tests
- name: First test run
run: |
ctest --test-dir build -j 8 --output-on-failure --rerun-failed
continue-on-error: true
- name: Second test run repeating failed tests
run: |
ctest --test-dir build -j 8 --output-on-failure --rerun-failed
- name: Generate a code coverage report
uses: threeal/gcovr-action@v1.0.0
with:
coveralls-out: coverage.coveralls.json
excludes: |
build
- name: Sent to Coveralls
uses: coverallsapp/github-action@v2
with:
file: coverage.coveralls.json