-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat: improve coverage action #73
Conversation
gas1cent
commented
Jul 1, 2024
•
edited
Loading
edited
- Renamed coverage check on main -> coverage check
- Upgraded actions to v4
- Excluded integration tests from the coverage report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
.github/workflows/coverage.yml
Outdated
@@ -28,7 +29,7 @@ jobs: | |||
|
|||
- name: Run coverage | |||
shell: bash | |||
run: forge coverage --report summary --report lcov | |||
run: forge coverage --report summary --report lcov --match-contract Unit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- when writing
.tree
files, theUnit
part of the module under test is usually skipped (at least it is on this repo) - then, if testcases are generated with
bulloak scaffold
, the contract names won't includeUnit
- therefore, those tests won't be run, and we'll have false CI negatives and lack of coverage
I'd pass --match-path test/unit/*
instead (remember match path uses globs instead of regex)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍