Skip to content

Conversation

ashutosh-ukey
Copy link
Contributor

@ashutosh-ukey ashutosh-ukey commented Dec 24, 2024

Summary

Add code coverage checking script.

Detail

Add a script that checks that the coverage of each files matches our minimum defined threshold. Currently, the script doesn't fail. Once you files meet our defined threshold, we can uncomment the line that will make the script start failing.

Checklist

  • Did you add new tests and confirm all tests pass? (yarn test)
  • [] Did you update relevant docs? (docs are found in the docs folder)
  • Do your commits follow the Conventional Commits standard?
  • Does your PR title also follow the Conventional Commits standard?
  • If you have a breaking change, is it correctly reflected in your commit message? (e.g. feat!: breaking change)
  • Did you run lint (yarn lint) and fix any issues?
  • [] Did you run formatter (yarn format:check) and fix any issues (yarn format:write)?

Testing

See Coverage -> run_coverage (pull_request) -> Run Test Coverage job logs in latest PR build (copy-pasted below for reviewers' conveniece)

2025-02-07T20:30:30.1404965Z Total coverage: 
2025-02-07T20:30:30.1409489Z | File                                                                           | % Lines            | % Statements       | % Branches       | % Funcs          |
2025-02-07T20:30:30.1410798Z |--------------------------------------------------------------------------------|--------------------|--------------------|------------------|------------------|
2025-02-07T20:30:30.1411949Z | Total                                                                          | 89.49% (1507/1684) | 90.42% (1747/1932) | 69.20% (173/250) | 91.12% (236/259) |
2025-02-07T20:30:30.1412351Z 
2025-02-07T20:30:30.1412603Z Found files below coverage threshold: 
2025-02-07T20:30:30.1413383Z | File                                                                           | % Lines            | % Statements       | % Branches       | % Funcs          |
2025-02-07T20:30:30.1414592Z |--------------------------------------------------------------------------------|--------------------|--------------------|------------------|------------------|
2025-02-07T20:30:30.1415764Z | src/callback/DefaultCallbackHandler.sol                                        | 50.00% (5/10)      | 22.22% (2/9)       | 100.00% (0/0)    | 60.00% (3/5)     |
2025-02-07T20:30:30.1416892Z | src/libs/PublicKeyLib.sol                                                      | 87.50% (7/8)       | 88.89% (8/9)       | 0.00% (0/1)      | 100.00% (2/2)    |
2025-02-07T20:30:30.1417934Z | src/libs/WebAuthnLib.sol                                                       | 91.43% (64/70)     | 86.21% (75/87)     | 40.00% (4/10)    | 100.00% (4/4)    |
2025-02-07T20:30:30.1419077Z | src/msca/6900/shared/libs/Bytes32DLLLib.sol                                    | 96.36% (53/55)     | 96.77% (60/62)     | 66.67% (4/6)     | 100.00% (9/9)    |
2025-02-07T20:30:30.1420435Z | src/msca/6900/v0.7/account/BaseMSCA.sol                                        | 89.09% (147/165)   | 91.40% (170/186)   | 73.91% (17/23)   | 92.31% (24/26)   |
2025-02-07T20:30:30.1422201Z | src/msca/6900/v0.7/account/UpgradableMSCA.sol                                  | 83.33% (15/18)     | 92.00% (23/25)     | 0.00% (0/1)      | 80.00% (4/5)     |
2025-02-07T20:30:30.1424323Z | src/msca/6900/v0.7/account/semi/SingleOwnerMSCA.sol                            | 82.35% (126/153)   | 84.57% (148/175)   | 60.00% (18/30)   | 94.44% (17/18)   |
2025-02-07T20:30:30.1425938Z | src/msca/6900/v0.7/factories/UpgradableMSCAFactory.sol                         | 95.45% (42/44)     | 95.45% (42/44)     | 60.00% (3/5)     | 100.00% (8/8)    |
2025-02-07T20:30:30.1427571Z | src/msca/6900/v0.7/factories/semi/SingleOwnerMSCAFactory.sol                   | 95.83% (23/24)     | 96.00% (24/25)     | 66.67% (2/3)     | 100.00% (4/4)    |
2025-02-07T20:30:30.1429151Z | src/msca/6900/v0.7/libs/ExecutionHookLib.sol                                   | 66.67% (60/90)     | 65.15% (86/132)    | 37.50% (3/8)     | 100.00% (5/5)    |
2025-02-07T20:30:30.1430828Z | src/msca/6900/v0.7/libs/RepeatableFunctionReferenceDLLLib.sol                  | 97.65% (83/85)     | 97.85% (91/93)     | 77.78% (7/9)     | 100.00% (13/13)  |
2025-02-07T20:30:30.1432535Z | src/msca/6900/v0.7/managers/PluginExecutor.sol                                 | 91.67% (33/36)     | 93.33% (42/45)     | 66.67% (6/9)     | 100.00% (2/2)    |
2025-02-07T20:30:30.1434252Z | src/msca/6900/v0.7/managers/PluginManager.sol                                  | 86.07% (173/201)   | 88.30% (234/265)   | 47.92% (23/48)   | 100.00% (8/8)    |
2025-02-07T20:30:30.1436168Z | src/msca/6900/v0.7/managers/StandardExecutor.sol                               | 72.73% (8/11)      | 75.00% (9/12)      | 0.00% (0/2)      | 100.00% (2/2)    |
2025-02-07T20:30:30.1437694Z | src/msca/6900/v0.7/plugins/BasePlugin.sol                                      | 46.67% (14/30)     | 52.63% (10/19)     | 0.00% (0/2)      | 50.00% (7/14)    |
2025-02-07T20:30:30.1439468Z | src/msca/6900/v0.7/plugins/v1_0_0/acl/SingleOwnerPlugin.sol                    | 94.25% (82/87)     | 95.00% (76/80)     | 50.00% (3/6)     | 93.75% (15/16)   |
2025-02-07T20:30:30.1440949Z | src/paymaster/BasePaymaster.sol                                                | 56.41% (22/39)     | 60.00% (15/25)     | 0.00% (0/1)      | 52.94% (9/17)    |
2025-02-07T20:30:30.1441881Z | src/paymaster/v1/permissioned/SponsorPaymaster.sol                             | 96.88% (31/32)     | 97.30% (36/37)     | 75.00% (3/4)     | 100.00% (8/8)    |
2025-02-07T20:30:30.1442925Z | src/utils/ExecutionUtils.sol                                                   | 79.31% (23/29)     | 80.77% (21/26)     | 66.67% (2/3)     | 83.33% (5/6)     |
2025-02-07T20:30:30.1443505Z 
2025-02-07T20:30:30.1443722Z Files above coverage threshold: 
2025-02-07T20:30:30.1444870Z | File                                                                           | % Lines            | % Statements       | % Branches       | % Funcs          |
2025-02-07T20:30:30.1446251Z |--------------------------------------------------------------------------------|--------------------|--------------------|------------------|------------------|
2025-02-07T20:30:30.1447690Z | src/account/v1/ECDSAAccount.sol                                                | 100.00% (22/22)    | 100.00% (16/16)    | 100.00% (2/2)    | 100.00% (8/8)    |
2025-02-07T20:30:30.1449217Z | src/account/v1/factory/ECDSAAccountFactory.sol                                 | 100.00% (19/19)    | 100.00% (21/21)    | 100.00% (1/1)    | 100.00% (5/5)    |
2025-02-07T20:30:30.1450833Z | src/erc712/BaseERC712CompliantAccount.sol                                      | 100.00% (2/2)      | 100.00% (2/2)      | 100.00% (0/0)    | 100.00% (1/1)    |
2025-02-07T20:30:30.1452261Z | src/libs/AddressBytesLib.sol                                                   | 100.00% (2/2)      | 100.00% (1/1)      | 100.00% (0/0)    | 100.00% (1/1)    |
2025-02-07T20:30:30.1453589Z | src/libs/CastLib.sol                                                           | 100.00% (10/10)    | 100.00% (11/11)    | 100.00% (0/0)    | 100.00% (2/2)    |
2025-02-07T20:30:30.1454701Z | src/libs/MessageHashUtils.sol                                                  | 100.00% (6/6)      | 100.00% (5/5)      | 100.00% (0/0)    | 100.00% (1/1)    |
2025-02-07T20:30:30.1455466Z | src/libs/RecipientAddressLib.sol                                               | 100.00% (47/47)    | 100.00% (59/59)    | 100.00% (21/21)  | 100.00% (4/4)    |
2025-02-07T20:30:30.1456200Z | src/libs/SetValueLib.sol                                                       | 100.00% (6/6)      | 100.00% (7/7)      | 100.00% (0/0)    | 100.00% (1/1)    |
2025-02-07T20:30:30.1457010Z | src/msca/6900/shared/erc712/BaseERC712CompliantModule.sol                      | 100.00% (2/2)      | 100.00% (2/2)      | 100.00% (0/0)    | 100.00% (1/1)    |
2025-02-07T20:30:30.1457895Z | src/msca/6900/shared/libs/AddressDLLLib.sol                                    | 100.00% (57/57)    | 100.00% (64/64)    | 100.00% (6/6)    | 100.00% (9/9)    |
2025-02-07T20:30:30.1458762Z | src/msca/6900/shared/libs/ValidationDataLib.sol                                | 100.00% (33/33)    | 100.00% (37/37)    | 100.00% (14/14)  | 100.00% (4/4)    |
2025-02-07T20:30:30.1459676Z | src/msca/6900/v0.7/account/WalletStorageInitializable.sol                      | 100.00% (22/22)    | 100.00% (24/24)    | 100.00% (6/6)    | 100.00% (3/3)    |
2025-02-07T20:30:30.1460574Z | src/msca/6900/v0.7/libs/FunctionReferenceDLLLib.sol                            | 100.00% (65/65)    | 100.00% (75/75)    | 100.00% (6/6)    | 100.00% (12/12)  |
2025-02-07T20:30:30.1462045Z | src/msca/6900/v0.7/libs/FunctionReferenceLib.sol                               | 100.00% (4/4)      | 100.00% (2/2)      | 100.00% (0/0)    | 100.00% (2/2)    |
2025-02-07T20:30:30.1462912Z | src/msca/6900/v0.7/libs/SelectorRegistryLib.sol                                | 100.00% (30/30)    | 100.00% (82/82)    | 100.00% (0/0)    | 100.00% (3/3)    |
2025-02-07T20:30:30.1464299Z | src/msca/6900/v0.7/libs/WalletStorageV1Lib.sol                                 | 100.00% (2/2)      | 100.00% (1/1)      | 100.00% (0/0)    | 100.00% (1/1)    |
2025-02-07T20:30:30.1465277Z | src/msca/6900/v0.7/plugins/v1_0_0/addressbook/ColdStorageAddressBookPlugin.sol | 99.14% (115/116)   | 99.17% (120/121)   | 95.00% (19/20)   | 100.00% (14/14)  |
2025-02-07T20:30:30.1466183Z | src/utils/PaymasterUtils.sol                                                   | 100.00% (16/16)    | 100.00% (18/18)    | 100.00% (0/0)    | 100.00% (2/2)    |
2025-02-07T20:30:30.1466528Z 
2025-02-07T20:30:30.1466630Z Done in 30.77s.

@ashutosh-ukey ashutosh-ukey force-pushed the add-code-coverage-script-ep06 branch from 7628c02 to dc75fc8 Compare February 7, 2025 20:29
@ashutosh-ukey ashutosh-ukey marked this pull request as ready for review February 7, 2025 20:29
@huaweigu huaweigu merged commit f33a955 into circlefin:entry-point-v0.6 Feb 8, 2025
6 checks passed
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