Skip to content

Add comprehensive test coverage for cuddInteract.c interaction matrix operations #682

Add comprehensive test coverage for cuddInteract.c interaction matrix operations

Add comprehensive test coverage for cuddInteract.c interaction matrix operations #682

Workflow file for this run

name: Code Coverage
on:
pull_request:
branches:
- main
- 4.0.0
workflow_dispatch:
concurrency:
group: ${{ github.event_name }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
coverage:
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build catch2 lcov
- name: Configure with coverage flags
run: |
cmake -S . -B /tmp/build \
-DCUDD_BUILD_SHARED_LIBS=OFF \
-DCUDD_BUILD_WITH_STATS=ON \
-DCUDD_BUILD_TESTS=ON \
-DCUDD_BUILD_COVERAGE=ON
- name: Build
run: cmake --build /tmp/build
- name: Capture test coverage data
run: cmake --build /tmp/build --target coverage
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: /tmp/build/coverage.info
format: lcov
- name: Upload coverage HTML report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: /tmp/build/coverage_html/
- name: Summary
if: always()
run: |
echo "## Code Coverage Summary"
echo "- Build type: Debug with coverage flags"
if [ -f "/tmp/build/coverage.info" ]; then
echo "Coverage data generated successfully"
lcov --summary /tmp/build/coverage.info --ignore-errors unused
else
echo "Coverage data not available"
fi