-
Notifications
You must be signed in to change notification settings - Fork 26
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
Code coverage #656
Code coverage #656
Conversation
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.
What we have done on other projects is to include the codecov logic within the tests workflow, but only run it on one operating system (for instance, Linux). For example, for the Upload coverage to Codecov
action, you can say if: ${{ matrix.config.name == 'Linux'}}
, and there are things you can do to add the extra codecov arguments as well for only Linux (and not the other operating systems).
However, I'm not sure what to do about the editable install (-e
) part. I guess we can keep this as a separate workflow if we want the main tests to not perform an editable install. The only issue is that, if we make workflow changes to the test.yml
, they won't be reflected here. But we might need to just work with that anyways. What do you think?
.github/workflows/codecov.yml
Outdated
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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.
This token has been added.
I think it makes more sense to move it actually. I'm going to do that |
I added the codecov stuff to the test workflow now |
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.
Looks good to me
Codecov needs to be setup. Get a token from here and setup for hexrd. Must be added as a workflow secret in settings.
Once it is, this PR adds a code coverage workflow and a status badge to the readme.
Maybe refactor to add the code coverage workflow to be part of the test workflow. I did it separately because the test workflow runs on many OS's and that is unnecessary for coverage checks. Also codecov needs an editable install of hexrd, and while I assume that doesn't change anything, the actual test cases should be as close to production as possible.
Fixes: #571