Forced excluding tests from coverage report. #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Test | |
working-directory: ${{github.workspace}}/build | |
run: ctest -C ${{env.BUILD_TYPE}} -E 'Benchmark' | |
# - name: Generate coverage xml | |
# run: gcovr -f ${{github.workspace}}/src -xml-pretty > coverage.xml | |
- name: remove not needed files | |
run: rm -rf ${{github.workspace}}/build/_deps; rm -rf {{github.workspace}}/test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4.0.1 | |
with: | |
# file: ${{github.workspace}}/coverage.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# exclude: ${{github.workspace}}/test | |
verbose: true |