systemaccounting / mxfactorial

a payment application intended for deployment by the united states treasury that replaces banking with accounting
https://www.systemaccounting.org
46 stars 26 forks source link

rust types crate unit tests #310

Closed mxfactorial closed 11 months ago

mxfactorial commented 11 months ago

current

cd crates/types && cargo tarpaulin
...
|| Uncovered Lines:
|| crates/types/src/account.rs: 58, 61-62, 65-66, 71-72, 77-80, 82
|| crates/types/src/account_role.rs: 17-21, 25-26, 32, 38-40, 42, 46-47
|| crates/types/src/approval.rs: 25, 27-31
|| crates/types/src/rule.rs: 71-74, 76, 81-82, 87-88, 91-92
|| crates/types/src/time.rs: 12-13, 18-19, 27-30, 32, 35-36, 44, 48-49
|| crates/types/src/transaction_item.rs: 67-68
|| services/rule/src/rules/utils.rs: 7-8
...
52.71% coverage, 68/129 lines covered, +0.00% change in coverage

expected

  1. eliminate majority of uncovered lines - 12 hours
  2. add dev-crates.yaml github workflow - 4 hours
    1. add needs dev-rule.yaml
    2. add --fail-under tarpaulin option
  3. comment post coverage cd crates/types && cargo tarpaulin

    hourly estimate

    16

mxfactorial commented 11 months ago

post coverage cd crates/types && cargo tarpaulin:

> cd crates/types && cargo tarpaulin
|| Uncovered Lines:
|| 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: 10/10
|| crates/types/src/approval.rs: 3/3
|| 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
|| 
96.64% coverage, 115/119 lines covered
mxfactorial commented 11 months ago

hours worked

18

added 95% minimal coverage requirement to types crate in dev-crates.yaml github workflow

the req to add a needs property to a job triggering the dev-rule.yaml workflow req was removed

a workflow_run event is available

will add in later pr