-
Notifications
You must be signed in to change notification settings - Fork 309
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
Multi Platform CI Pipeline with GitHub Actions #651
Conversation
Also, since @callmecampos is not a maintainer, the action won't run on this PR, but you can see it running on his branch here: https://github.com/callmecampos/twine/actions?query=branch%3Amulti-platform-ci |
8cb868f
to
1cc6c49
Compare
e68a540
to
f196e89
Compare
f196e89
to
a89b8df
Compare
What would the steps be after merging this, @di? |
Aside from removing the Travis config in a separate PR, nothing. Once merged it will run on all PRs and pushes. |
@callmecampos can you resolve the merge conflicts here? |
@sigmavirus24 merge conflicts resolved and new CI checks passed here: https://github.com/callmecampos/twine/actions/runs/127062822 |
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.
Apologies for the late review here. I noticed a few things, but they don't need to hold up a merge; happy to address them later.
…wine into multi-platform-ci
@bhrutledge I made the changes you suggested, thanks for reviewing! Also, according to codecov/codecov-action#37 there have been issues with codecov uploads timing out with GitHub Actions, so instead of uploading Coverage.py's XML report using |
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.
Thanks! One small change to avoid redundancy.
That's a bummer re: Codecov. I opened #658 to consider replacing it.
Also, looking at the commit history, I think this should be squashed, either using the "Squash & Merge" button when it's ready, or locally via git rebase -i
.
Following up on this:
@callmecampos, have you seen timeouts in practice? From a GitHub search, it looks this action is widely used, including by some high-profile Python projects:
With that list, I guess I'd be surprised if it's not safe to use. |
Co-authored-by: Brian Rutledge <[email protected]>
@bhrutledge Yeah, I was seeing it sporadically yesterday. If you go to this run here, and click on the failing job ( |
Co-authored-by: Dustin Ingram <[email protected]>
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.
@callmecampos Thanks for the link. Now that you mention it, I have seen those errors before; I usually just restart the job when that happens.
As long as we still have Travis, I think this Actions setup is great. When we drop Travis, we'll need to add types
, docs
, and release
stages. It might also be worth revisiting Codecov.
I've added a checklist which includes all of those to #650. |
You can now see the successful run here: https://github.com/pypa/twine/actions/runs/131530548 |
Per discussion in #650, this PR leverages GitHub Actions to test twine against Ubuntu, macOS, and Windows.
This involved some changes to the twine.wheel unit tests, specifically surrounding the assumption of Unix/Posix environments for path representations. To fix this, we now use
pathlib
in the wheel unit tests to represent paths, since when initializing apathlib.Path
object,pathlib
automatically returns aPosixPath
or aWindowsPath
dependent on the operating system at runtime.Additionally, integration tests
test_devpi_upload
andtest_pypi_server_upload
are expected to fail on Windows and thus skipped since they're usingpytest-services
'watcher-getter
fixture, which doesn't support Windows according to pytestservices:#22.There has also been discussion in #650 about replacing Travis entirely with GitHub Actions, which is reasonable enough, though .travis.yml also includes a code coverage step (
codecov --env TRAVIS_OS_NAME, TOX_ENV
) which I don't believe we currently have with GitHub Actions. Talking with @di, we could move to using a different coverage tool like https://pypi.org/project/coverage/.This can be done in this PR or a later one which migrates away from Travis completely towards GitHub Actions.Update 6/5/20: Added code coverage to the config file.