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

Added in-build coverage collection and checking in CI #20

Merged
merged 50 commits into from
May 6, 2021

Conversation

altendky
Copy link
Contributor

No description provided.

@altendky altendky mentioned this pull request Apr 11, 2021
@altendky
Copy link
Contributor Author

Coveralls doesn't have great integration for GitHub Actions. It can only manage comments in the PR for in-repo PRs, not PRs from forks (I think we could do something, wouldn't be great). To report coverage to them you have to publicly post your Coveralls repository token. I think that codecov handles this by providing a GitHub application that you give some level of access to your repository, but Coveralls doesn't seem to have this yet.

As to posting the Coveralls token publicly, both Trio and Twisted have posted such tokens to deal with PRs from forks. They concluded that the associated risk was acceptable since, at least for the first order, it is just a hazard of uploading bogus coverage reports.

https://github.com/altendky/pylddwrap/blob/65e90cbb62ccb8a050519af72535f47ced1813c7/.github/workflows/ci.yml#L246-L252

    - name: Publish to Coveralls
      if: always()
      continue-on-error: true
      run: |
        python -m coveralls -v
      env:
        COVERALLS_REPO_TOKEN: 'fill in here'

As is, the project is using coverage itself to assert >90% project coverage and diff-cover to assert 100% coverage of the changes.

Let me know where we should go from here, or how any questions you have on the topic.

@altendky
Copy link
Contributor Author

@mristin ping about ^ just to help with notifications maybe. :]

@mristin
Copy link
Collaborator

mristin commented Apr 12, 2021

Hi @altendky ,
LGTM! The coverage of the pull requests doesn't have to go to coveralls. I think your solution with the artifacts is great for the code reviews. The only thing that has to go to coveralls is the coverage on merges to main branch, which run within the repository, so no tokens need to be leaked etc.

@altendky
Copy link
Contributor Author

Alrighty, I'll update in hopes the coverage upload works on merge...

@altendky altendky marked this pull request as ready for review April 12, 2021 20:55
@altendky
Copy link
Contributor Author

@mristin, welp, I don't know if the error is the right one or not...

Could not submit coverage: 422 Client Error: Unprocessable Entity for url: coveralls.io/api/v1/jobs

But, it is trying to upload anyways. We could try this in-repo if you push the branch and PR if you want to avoid trying to fix this on master.

@mristin
Copy link
Collaborator

mristin commented Apr 13, 2021

But, it is trying to upload anyways. We could try this in-repo if you push the branch and PR if you want to avoid trying to fix this on master.

@altendky Let's just fix it on master -- I think the coveralls will just work once it is merged. Could you please ping me when you'd like me to review the pull request? (Or is it already review-ready?)

@altendky
Copy link
Contributor Author

@mristin I think it's ready for review, yeah.

@altendky
Copy link
Contributor Author

altendky commented May 5, 2021

No particular rush on this end, but just a gentle bump in case this got lost.

@altendky
Copy link
Contributor Author

altendky commented May 5, 2021

@mristin (bah, forgot the pingy bit)

Copy link
Collaborator

@mristin mristin left a comment

Choose a reason for hiding this comment

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

LGTM! Please let me know when it is ready to be merged in!

@altendky
Copy link
Contributor Author

altendky commented May 6, 2021

I'm good with it, thanks.

@mristin mristin merged commit 64bb203 into Parquery:master May 6, 2021
@mristin
Copy link
Collaborator

mristin commented May 6, 2021

Great, thanks! It's in :).

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.

None yet

2 participants