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

tools: Add test coverage html output #466

Merged
merged 4 commits into from
May 24, 2022
Merged

Conversation

fredcarle
Copy link
Collaborator

@fredcarle fredcarle commented May 24, 2022

RELEVANT ISSUE(S)

Resolves #465

DESCRIPTION

Instead of relying on codecov to inspect our code coverage, we can do it locally using -coverprofile. This PR adds a make command to simplify the process.

HOW HAS THIS BEEN TESTED?

This was tested by running the new make command and insuring that the html output was displayed and that temporary files were cleaned up.

make test:coverage-html path="./api/..."

CHECKLIST:

  • I have commented the code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the repo-held documentation.
  • I have made sure that the PR title adheres to the conventional commit style (subset of the ones we use can be found under: tools/configs/chglog/config.yml

ENVIRONMENT / OS THIS WAS TESTED ON?

Please specify which of the following was this tested on (remove or add your own):

  • Arch Linux
  • Debian Linux
  • MacOS
  • Windows

@fredcarle fredcarle added area/testing Related to any test or testing suite action/no-benchmark Skips the action that runs the benchmark. priority/low labels May 24, 2022
@fredcarle fredcarle requested a review from a team May 24, 2022 03:48
@fredcarle fredcarle force-pushed the fredcarle/test/coverage-html branch from 5409af2 to 5222a50 Compare May 24, 2022 03:52
Makefile Outdated Show resolved Hide resolved
@fredcarle fredcarle changed the title Test: Add test coverage html output test: Add test coverage html output May 24, 2022
Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

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

Made some comments, most notable is the path inconsistency between macos and linux.

I generally think of test: commit label as when we add tests to the code. i.e. integration tests or unit tests. For stuff related to code coverage, make rules and these "external" tasks I like to use tools : label in the title.

Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
@fredcarle
Copy link
Collaborator Author

Made some comments, most notable is the path inconsistency between macos and linux.

I generally think of test: commit label as when we add tests to the code. i.e. integration tests or unit tests. For stuff related to code coverage, make rules and these "external" tasks I like to use tools : label in the title.

I think it was just a usage issue for the path. See my comment above.

Thanks for clarifying. I'll change it to tools.

@fredcarle fredcarle changed the title test: Add test coverage html output tools: Add test coverage html output May 24, 2022
@fredcarle fredcarle removed the area/testing Related to any test or testing suite label May 24, 2022
@fredcarle fredcarle merged commit 9f896b2 into develop May 24, 2022
@fredcarle fredcarle deleted the fredcarle/test/coverage-html branch May 24, 2022 19:22
shahzadlone pushed a commit to shahzadlone/defradb that referenced this pull request Feb 23, 2024
- RELEVANT ISSUE(S)
Resolves sourcenetwork#466 

- DESCRIPTION
Instead of relying on codecov to inspect our code coverage, we can do it locally using -coverprofile. This PR adds a make command to simplify the process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action/no-benchmark Skips the action that runs the benchmark. priority/low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: add test coverage html output
3 participants