-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Integrate GitHub Actions CI/CD tests #1840
Integrate GitHub Actions CI/CD tests #1840
Conversation
Does it work offline? Or it is solely for vendor lock-in? |
@techtonik That seems a bit of an unfair standard to judge this contribution by, considering none of our other CI providers have configuration files that work offline or are open source. Also, I may be misunderstanding your concern - are you suggesting that @webknjaz is adding this to try and lock us in to a specific vendor, or that he's adding it to help us avoid vendor lock-in? |
It is possible to Travis CI tests this way - https://stackoverflow.com/questions/21053657/how-to-run-travis-ci-locally and I guess GitLab CI can also be self-hosted, so I just wonder if there is some advancement in defining CI tasks with this new technology. I'd prefer open source projects promote open source development practices that don't depend on proprietary platforms, but that's just my opinion. |
GitHub has promised to release an open-source runner (I guess that'll happen after Nov 13) for their workflows which you'd be able to plug into your repos BYON-style.
Those images are out of date by a few years. And Travis CI doesn't use docker anymore. The only way to truly debug in their env today is to email them and request SSH feature. This contribution is to (1) demo the new thing and (2) probably spread the load between CIs + the result statuses are more precisely shown in PRs. Currently, I'm thinking that it should be quite good for fast linters in particular. It's also useful for doing GitHub-related automations (you can react to any event, post comments back etc.). |
FWIW, Travis CI images are updated regularly - check this out - https://hub.docker.com/u/travisci |
Maybe smth's changed but those aren't VMs they are actually running. |
@pganssle you may have to hit "Enable" in the pop-up @ https://github.com/pypa/setuptools/actions |
Right, containers are not VMs. |
@pganssle ready to give it a try? |
I don't really have time to look into this right now, maybe one of the other maintainers can take a look? @pypa/setuptools-developers I am not 100% clear on whether this adds more CI runs to each PR or if it's running on a schedule, like a cron job or something. I remember last time I tried to hook up travis or something as a github app instead of its built-in version, I didn't really care for the UI. Do you have any examples of repos that already set up something like this so we can see how it will change the PR workflow? |
I'm pleased that the recipe isn't too complicated and is fairly intuitively read. If @webknjaz can assert that this change doesn't affect the PR workflow or at least doesn't block the current PR workflow, then I'm happy to proceed. If it does affect the PR workflow, I'd like to ensure that it doesn't dramatically impact either the reliability (flakiness) of the tests or the total run time. I'd be okay to accept it if @webknjaz could provide a snapshot analysis of the total run time of a PR check run before and after accepting this change. |
All 3: PR, push and cron.
Scroll to the Checks section on this page: aio-libs/aiohttp#4056. @jaraco unless you enforce this, it won't block PRs. Also, GitHub runs up to 20 jobs in parallel and in this demo in my fork you can see that each job takes 3-4 mins to complete: https://github.com/webknjaz/setuptools/runs/209318165. So it's reasonable to expect that all jobs from a workflow would be finished in 4 minutes after pushing the code. |
tests: | ||
name: 👷 | ||
runs-on: ${{ matrix.os }} | ||
strategy: |
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.
It's important to note that by default any job failure will cause all other jobs in the workflow to be canceled. If you don't want that, apply this patch:
strategy: | |
strategy: | |
fail-fast: false |
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.
I've found this useful, especially if there's a network-related timeout in one job.
@jaraco is this enough? |
Yes, let's give it a go. We can dial it back or roll it back entirely if it causes too much friction. |
Co-Authored-By: Hugo van Kemenade <[email protected]>
This change is necessary because macOS 10.15 is now deprecated. Ref: https://github.blog/changelog/2019-10-31-github-actions-macos-virtual-environment-is-updating-to-catalina-and-dropping-mojave-support Co-Authored-By: Hugo van Kemenade <[email protected]>
@jaraco mind merging then? |
@techtonik as per your earlier question — here's some refs about the open-source runner: |
I'm not sure why I didn't merge this before. Here it goes. |
Demo: https://github.com/webknjaz/setuptools/runs/209318165 (in fork because it won't show up in upstream w/o merge)