Skip to content

further down

further down #91

Workflow file for this run

name: code coverage
on: [push]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Get latest cmake
uses: lukka/get-cmake@latest
- name: set compiler
run: |
echo "CXX=g++-10" >> $GITHUB_ENV
echo "CC=gcc-10" >> $GITHUB_ENV
- name: Configure
env:
CXXFLAGS: --coverage -g -O0
CFLAGS: --coverage -g -O0
LDFLAGS: --coverage
run: cmake --toolchain ../vcpkg/scripts/buildsystems/vcpkg.cmake -B build -S .
- name: Build
run: cmake --build build --parallel
- name: Execute
run: cmake --build build --target test
- name: Install gcovr
run: |
sudo apt-get update
sudo apt-get install -yq gcovr
sudo apt-get clean
- name: Create report
run: |
mkdir html
gcovr --filter include/io1/money.hpp --exclude-unreachable-branches --exclude-lines-by-pattern '.*assert.*' --print-summary -x coverage.xml --html-details html/index.html --html-details-syntax-highlighting -r . build
- uses: 5monkeys/cobertura-action@v13
with:
path: coverage.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 84
fail_below_threshold: true
show_line: true
show_branch: true
show_missing: true
- uses: actions/upload-artifact@v3
with:
name: detailed coverage report
path: html