Skip to content

Commit

Permalink
Update CI workflow for C++ coverage generation and testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nagajaideep committed Dec 1, 2024
1 parent 4688182 commit cea030c
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,29 @@ jobs:
- name: Build package
run: |
python scripts/build/install.py
- name: Build C++ Code with Coverage
run: |
mkdir build
cd build
cmake -DCMAKE_CXX_FLAGS="--coverage" ..
make
- name: Run C++ Tests
run: |
cd build
./test_binary
# Capture and Generating Coverage Report with lcov
- name: Capture Coverage Data with lcov
run: |
cd build
lcov --capture --directory . --output-file coverage.info
- name: Generate HTML Coverage Report with genhtml
run: |
cd build
genhtml coverage.info --output-directory coverage_report
- name: Run tests
run: |
python -m pytest --doctest-modules --cov=./ --cov-report=xml -s
Expand Down

0 comments on commit cea030c

Please sign in to comment.