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

replace cargo tarpaulin with llvm-cov #312

Closed
mxfactorial opened this issue Nov 3, 2023 · 2 comments · Fixed by #313
Closed

replace cargo tarpaulin with llvm-cov #312

mxfactorial opened this issue Nov 3, 2023 · 2 comments · Fixed by #313
Assignees

Comments

@mxfactorial
Copy link
Contributor

mxfactorial commented Nov 3, 2023

current

https://github.com/xd009642/tarpaulin prints inconsistent test coverage

example, cargo tarpaulin -p types prints:

Coverage Results:
|| Uncovered Lines:
|| crates/types/src/account_role.rs: 17
|| crates/types/src/transaction_item.rs: 67-68
|| services/rule/src/rules/utils.rs: 7-8
|| Tested/Total Lines:
|| crates/types/src/account.rs: 16/16
|| crates/types/src/account_role.rs: 9/10
|| crates/types/src/approval.rs: 6/6
|| crates/types/src/rule.rs: 9/9
|| crates/types/src/time.rs: 15/15
|| crates/types/src/transaction_item.rs: 62/64
|| services/rule/src/rules/utils.rs: 0/2
||
95.90% coverage, 117/122 lines covered

but switching to a neighboring crate with cargo tarpaulin -p pg prints the same lines as Uncovered:

|| Uncovered Lines:
|| crates/pg/src/lib.rs: 28-31, 87-89, 97, 102, 104-105, 108-109, 111-112, 114, 116-120, 125-129, 131-132, 138, 143-144, 146-147, 149, 151, 154, 159-160, 162-163, 165, 167, 170, 175-176, 178-179, 181, 183, 188, 190-212, 216-218, 222, 224-258, 262-263
|| crates/sqls/src/lib.rs: 1-4, 8-36, 39-40, 43-44, 47-85, 88-90, 93-95
|| crates/types/src/account.rs: 43-44, 52-55, 58, 61-62, 65-66, 78-81, 83
|| crates/types/src/account_role.rs: 17-21, 33, 39-41, 43
|| crates/types/src/approval.rs: 25, 27-31
|| crates/types/src/rule.rs: 71-74, 76, 88-89, 92-93
|| crates/types/src/time.rs: 12-13, 16-17, 22-23, 31-34, 36, 39-40, 47, 51
|| crates/types/src/transaction_item.rs: 33-36, 40-43, 47-49, 53-55, 67-68, 75-79, 81-82, 85, 88-92, 94, 97-99, 101, 106-112, 114, 117-119, 123-125, 129-131, 133-136, 139-140, 143, 147, 149-152, 154
|| services/rule/src/rules/utils.rs: 7-8
|| Tested/Total Lines:
|| crates/pg/src/lib.rs: 9/123
|| crates/sqls/src/lib.rs: 0/82
|| crates/types/src/account.rs: 0/16 -100.00%
|| crates/types/src/account_role.rs: 0/10 -90.00%
|| crates/types/src/approval.rs: 0/6 -100.00%
|| crates/types/src/rule.rs: 0/9 -100.00%
|| crates/types/src/time.rs: 0/15 -100.00%
|| crates/types/src/transaction_item.rs: 0/64 -96.88%
|| services/rule/src/rules/utils.rs: 0/2 +0.00%
||
2.75% coverage, 9/327 lines covered, -93.15% change in coverage

expected

  1. replace tarpaulin with the source-based code coverage tool cargo-llvm-cov in:
    1. workflows - 2 hours
    2. devcontainers - 2 hours
  2. add cargo-llvm-cov as a make test target - 1 hour
  3. also, add the workflow_run event to trigger the dev-rule.yaml workflow after the dev-crates.yaml completes - 1 hour

hourly estimtate

6

@mxfactorial
Copy link
Contributor Author

hours worked

5.25

research & requirement writing: 5.25
total: 10.5

@mxfactorial
Copy link
Contributor Author

hours worked

+2 hours on devcontainers

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

Successfully merging a pull request may close this issue.

1 participant