Skip to content

test: optimize and add coverage job to ./yml flow#412

Merged
zsculac merged 6 commits into
mainfrom
rs/add-coverage-step-to-ci
Jun 27, 2025
Merged

test: optimize and add coverage job to ./yml flow#412
zsculac merged 6 commits into
mainfrom
rs/add-coverage-step-to-ci

Conversation

@radomir-sebek

@radomir-sebek radomir-sebek commented Jun 19, 2025

Copy link
Copy Markdown
Collaborator

Notable changes:

  • added .github/workflows/coverage.yml that will not be bocking any PRs, rather trigger test coverage calculations on demand or on push/merge to main branch
  • inside hardhat.node.config.ts, there was a strange logic for setting parameter of solidity compiler called viaIR. Namely, if this value is false, then upon running npm run coverage will throw compile error
Compilation:
============

UnimplementedFeatureError: Copying of type struct ProfileLib.OperatorFee memory[] memory to storage not yet supported.


Error in plugin solidity-coverage: HardhatError: HH600: Compilation failed

that seems to goes deep into argotorg/solidity#3446, which is beyond my knowledge.

After noticing that in compiler_config.json this parameter is set to true, I decided to update this flag in scope of coverage reporting as well.
Basically, I couldn't find better way to get coverage to work (tried updating solidity-coverage hw did not helped), and settingviaIR to true seemed like legit option.

  • SOLIDITY_COVERAGE=true
    This was recommended based on here

  • final html report should look like this:

Screenshot 2025-06-19 at 13 47 43

@radomir-sebek radomir-sebek self-assigned this Jun 19, 2025
@radomir-sebek radomir-sebek changed the title test: optimize and add coverage step to ./yml flow test: optimize and add coverage job to ./yml flow Jun 19, 2025
@radomir-sebek
radomir-sebek marked this pull request as ready for review June 20, 2025 08:26
@zsculac

zsculac commented Jun 27, 2025

Copy link
Copy Markdown
Contributor

Thanks @radomir-sebek, nice work. Merging this PR now

@zsculac
zsculac merged commit b2701ce into main Jun 27, 2025
3 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.

2 participants