Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code coverage workflow #70

Open
stephprince opened this issue Aug 7, 2024 · 0 comments
Open

Add code coverage workflow #70

stephprince opened this issue Aug 7, 2024 · 0 comments
Labels
priority: medium non-critical problem and/or affecting only a small set of users

Comments

@stephprince
Copy link
Collaborator

There is an existingcoverage.cmake file in the cmake folder. A coverage workflow could look something like this, but I haven't had a chance to test or integrate with codecov yet.

coverage:
  runs-on: ubuntu-latest

  steps:
  - uses: actions/checkout@v4

  - name: Install LCov
    run: sudo apt-get update -q
      && sudo apt-get install lcov -q -y

  - name: Configure
    run: cmake --preset=ci-coverage

  - name: Build
    run: cmake --build build/coverage -j 2

  - name: Test
    working-directory: build/coverage
    run: ctest --output-on-failure --no-tests=error -j 2

  - name: Process coverage info
    run: cmake --build build/coverage -t coverage

  - name: Submit to codecov.io
    uses: codecov/codecov-action@v4
    with:
      file: build/coverage/coverage.info
      token: ${{ secrets.CODECOV_TOKEN }}
@stephprince stephprince added the priority: medium non-critical problem and/or affecting only a small set of users label Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium non-critical problem and/or affecting only a small set of users
Projects
None yet
Development

No branches or pull requests

1 participant