Skip to content

Builds successfully #32

Builds successfully

Builds successfully #32

Workflow file for this run

name: Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake g++ libgtest-dev lcov
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Debug
- name: Build
run: cmake --build ${{github.workspace}}/build --config Debug
- name: Run tests
working-directory: ${{github.workspace}}/build
run: |
ctest --output-on-failure
# Run the test executable directly to ensure coverage data is generated
./tests/test_all
- name: Generate coverage report
working-directory: ${{github.workspace}}/build
run: |
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' '*/tests/*' --output-file coverage.info
lcov --list coverage.info
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}