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 test coverage workflow #460

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Conversation

danieleades
Copy link
Contributor

@danieleades danieleades commented Nov 29, 2023

adds a test coverage workflow

job result here - https://app.codecov.io/github/capnproto/capnproto-rust/tree/ci-coverage

@codecov-commenter
Copy link

Welcome to Codecov 🎉

Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.

Thanks for integrating Codecov - We've got you covered ☂️

@danieleades danieleades marked this pull request as ready for review November 29, 2023 07:07
@dwrensha
Copy link
Member

Cool!

@dwrensha dwrensha merged commit 20f6186 into capnproto:master Nov 29, 2023
7 checks passed
@danieleades danieleades deleted the ci-coverage branch November 29, 2023 14:34
@dwrensha
Copy link
Member

Do the tests in capnpc/test/test.rs count towards the coverage of capnpc/? I pushed a95d3e3 and I expected it to increase the reported coverage of target_size(), but it seems that it did not: https://app.codecov.io/github/capnproto/capnproto-rust/commit/a95d3e3adc41dd83b4575512f795430049ed6b27/blob/capnp/src/private/layout.rs#L748

@danieleades
Copy link
Contributor Author

Do the tests in capnpc/test/test.rs count towards the coverage of capnpc/? I pushed a95d3e3 and I expected it to increase the reported coverage of target_size(), but it seems that it did not: https://app.codecov.io/github/capnproto/capnproto-rust/commit/a95d3e3adc41dd83b4575512f795430049ed6b27/blob/capnp/src/private/layout.rs#L748

the coverage should be counted so long as the following command runs those tests-

          for features in \
            "--no-default-features" \
            "--features sync_reader" \
            "--features unaligned"
          do
            cargo llvm-cov --no-report --doctests --workspace $features

or equivalently if this command runs those tests-

          for features in \
            "--no-default-features" \
            "--features sync_reader" \
            "--features unaligned"
          do
            cargo test --doctests --workspace $features

does that command run the tests you're talking about?

@dwrensha
Copy link
Member

dwrensha commented Nov 29, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants