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

Add code coverage to Toga #1073

Merged
merged 4 commits into from
Sep 25, 2020

Conversation

saroad2
Copy link
Member

@saroad2 saroad2 commented Sep 24, 2020

Add coverage tests to Toga core abilities. we are now on 91% coverage!

This PR is missing us to add CODECOV_TOKEN to the repository's secrets.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

Copy link
Member

@freakboy3742 freakboy3742 left a 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 (and I'm a little shocked that coverage is as high as 91%...)

@freakboy3742 freakboy3742 merged commit d8efe03 into beeware:master Sep 25, 2020
@saroad2 saroad2 deleted the add_coverage_tests_to_core branch September 26, 2020 06:14
@samschott
Copy link
Member

@saroad2, this may be a stupid question but I thought I would ask here:

I can see that the coverage report is uploaded on every PR, even from non-maintainers. However, github secrets such as secrets.CODECOV_TOKEN should not be available to outside branches. How does this work? I am probably missing something really obvious.

@saroad2
Copy link
Member Author

saroad2 commented Oct 21, 2020

Let me start with the fact the CodeCov has a major bug with its coverage reports. I'm thinking about removing our integration with them and switch to something else.

As for the secret, it's available for Github Actions, not for the users. that's the reason it can run on every PR. the users themselves don't have access to the secret.

@samschott
Copy link
Member

samschott commented Oct 21, 2020

Not sure I understand. Couldn't the PR modify the Github Action itself to upload the secret to some server? From the GitHub docs:

With the exception of GITHUB_TOKEN, secrets are not passed to the runner when a workflow is triggered from a forked repository.

AFAIK, this includes PRs from forked repositories.

It looks like CodeCov might not actually use the secret at all during upload if the PR comes from an external fork: codecov/codecov-action#29.

In any case, it seems to be working, apart from issues with the coverage reports themselves...

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