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. #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,20 @@ jobs:
if: ${{ success() || failure() }}
run: |
cargo clippy --tests --no-default-features --features ${{ matrix.hpke }},client,server

- name: Install cargo-llvm-cov
if: matrix.rust == 'stable'
run: |
cargo install cargo-llvm-cov

- name: Generate coverage report
if: matrix.rust == 'stable'
run: |
cargo llvm-cov --features ${{ matrix.hpke }},client,server --cobertura --output-path target/cobertura.xml -- --test --test-threads=1

- name: Upload coverage artifact
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kapilvgit, for this run the coverage report has been uploaded to https://github.com/microsoft/ohttp/actions/runs/11993336685/artifacts/2229090801. 77.5% coverage :)

if: matrix.rust == 'stable'
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: target/cobertura.xml