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

Fix coverage reports configuration #1892

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

hectorgomezv
Copy link
Member

@hectorgomezv hectorgomezv commented Sep 3, 2024

Summary

Since the rootDir change in this PR, the coverage reports are taking into consideration all the folders in the root, instead of /src only. This PR restores this behavior by ignoring non-relevant folders regarding test coverage.

Changes

  • Adds non-relevant test coverage folders to coveragePathIgnorePatterns configuration.

@hectorgomezv hectorgomezv self-assigned this Sep 3, 2024
@hectorgomezv hectorgomezv requested a review from a team as a code owner September 3, 2024 08:59
@hectorgomezv hectorgomezv force-pushed the fix-coverage-report-ignore-patterns branch from 04cd9f5 to d722fdf Compare September 3, 2024 09:00
@hectorgomezv hectorgomezv changed the title Fix coverage report ignore patterns Fix coverage reports configuration Sep 3, 2024
@coveralls
Copy link

coveralls commented Sep 3, 2024

Pull Request Test Coverage Report for Build 10684918840

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 10 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.005%) to 46.327%

Files with Coverage Reduction New Missed Lines %
src/domain/staking/staking.repository.ts 10 32.26%
Totals Coverage Status
Change from base Build 10679610744: -0.005%
Covered Lines: 4811
Relevant Lines: 8363

💛 - Coveralls

Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

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

The coverage report still shows 46%. Do we first need to merge it?

@hectorgomezv
Copy link
Member Author

The coverage report still shows 46%. Do we first need to merge it?

You're right, I was under the impression that including the src reference into the collectCoverageFrom property worked, but that's not the case. I reverted to a previous commit where I was manually ignoring some folders: c9e9e82

This is the change: 9de1100

It's less clear, but works. Another idea would be to just restrict the coverage analysis to .ts files (instead of both .ts and .js). Any preference?

@iamacook
Copy link
Member

iamacook commented Sep 4, 2024

The coverage report still shows 46%. Do we first need to merge it?

You're right, I was under the impression that including the src reference into the collectCoverageFrom property worked, but that's not the case. I reverted to a previous commit where I was manually ignoring some folders: c9e9e82

This is the change: 9de1100

It's less clear, but works. Another idea would be to just restrict the coverage analysis to .ts files (instead of both .ts and .js). Any preference?

As it's not touched often, I don't think the clarity is a huge concern. I'm still not seeing an updated coverage report though 🙈

@hectorgomezv
Copy link
Member Author

The coverage report still shows 46%. Do we first need to merge it?

You're right, I was under the impression that including the src reference into the collectCoverageFrom property worked, but that's not the case. I reverted to a previous commit where I was manually ignoring some folders: c9e9e82
This is the change: 9de1100
It's less clear, but works. Another idea would be to just restrict the coverage analysis to .ts files (instead of both .ts and .js). Any preference?

As it's not touched often, I don't think the clarity is a huge concern. I'm still not seeing an updated coverage report though 🙈

I think Coveralls is not updating the report for some reason, but I see in this branch only src files are taken into consideration: https://github.com/safe-global/safe-client-gateway/actions/runs/10684954356/job/29616598722

And in other branches also other folders (like dist) are being considered: https://github.com/safe-global/safe-client-gateway/actions/runs/10698244987/job/29657195866

(See the Run yarn run test:cov coverage table at the end of the console output).

@hectorgomezv hectorgomezv merged commit 81f21d9 into main Sep 5, 2024
18 checks passed
@hectorgomezv hectorgomezv deleted the fix-coverage-report-ignore-patterns branch September 5, 2024 08:52
@iamacook iamacook mentioned this pull request Sep 6, 2024
DenSmolonski pushed a commit to Zilliqa/safe-client-gateway that referenced this pull request Oct 24, 2024
Adds non-relevant test coverage folders to coveragePathIgnorePatterns configuration.
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