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

feat: improve coverage action #73

Merged
merged 9 commits into from
Jul 4, 2024
Merged

Conversation

gas1cent
Copy link
Member

@gas1cent gas1cent commented Jul 1, 2024

  • Renamed coverage check on main -> coverage check
  • Upgraded actions to v4
  • Excluded integration tests from the coverage report

@gas1cent gas1cent requested a review from simon-something July 1, 2024 06:42
@gas1cent gas1cent self-assigned this Jul 1, 2024
simon-something
simon-something previously approved these changes Jul 1, 2024
wei3erHase
wei3erHase previously approved these changes Jul 1, 2024
Copy link
Member

@wei3erHase wei3erHase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • when writing .tree files, the Unit 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 include Unit
  • 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)

@gas1cent gas1cent dismissed stale reviews from wei3erHase and simon-something via cf57e94 July 2, 2024 13:36
Copy link
Member

@wei3erHase wei3erHase left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gas1cent gas1cent merged commit 9d36843 into main Jul 4, 2024
7 checks passed
@gas1cent gas1cent deleted the feat/improve-coverage-action branch July 4, 2024 03:16
xorsal pushed a commit that referenced this pull request Sep 27, 2024
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.

4 participants