Skip to content

Corectr Codecov report #53

Corectr Codecov report

Corectr Codecov report #53

name: Build & test on Linux
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: sudo apt install gcovr
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCODE_COVERAGE=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Run tests
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}} -E 'Benchmark'
- name: Generate coverage xml
run: gcovr --filter ${{github.workspace}}/src --xml --output coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
file: ${{github.workspace}}/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
disable_search: yes