Skip to content

Update gcovr command to ignore errors #6

Update gcovr command to ignore errors

Update gcovr command to ignore errors #6

Workflow file for this run

name: CI
on:
# Trigger on pushes ONLY to the main branch
push:
branches: [ "main" ]
# Trigger on PRs targeting the main branch
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download Test Data
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Built-in token, no setup needed
run: |
# Download specific file from the specific tag
gh release download timescales-data-v1 -p "data.zip"
unzip data.zip
- name: Install dependencies
run: |
sudo apt-get install -y gcovr libboost-all-dev
- name: Configure & Build
run: |
cmake -B build -DENABLE_COVERAGE=ON
cmake --build build
- name: Test & Generate Report
run: |
# Run tests
./build/tests/unit_tests
# 2. Run gcovr from the root
# --root . : explicit root
# --filter "include/" : keeps files that have 'include/' in their path
# --print-summary : prints text output to the GitHub console (so you can verify immediately)
gcovr --root . --filter "include/" --gcov-ignore-errors=no_working_dir_found --print-summary --xml -o build/tests/coverage.xml build
- name: Upload to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/tests/coverage.xml
fail_ci_if_error: true