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

Switch CI to Github Actions #125

Merged
merged 14 commits into from
Mar 11, 2022
Merged

Conversation

deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Dec 13, 2020

Closes #124.
Fixes #129.

@@ -6,6 +6,7 @@ on:
push:
branches:
- master
- github_actions

Choose a reason for hiding this comment

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

Is there any reason to limit branches that run tests at all? It results in ugly hacks like what you had to do in this commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just because github actions is not yet enabled in this repository, otherwise CI would've run because of the pull_request event. The reason to limit branches is to avoid duplicate CI runs on pushes to pull requests.

Choose a reason for hiding this comment

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

Even after GitHub Actions is enabled, user might want to run tests before creating a PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. This is maintainers preference. My preference is that users either open a WIP PR or modifiy the workflow temporarily, and avoid all the duplicate builds by default. Others may have other preference. It's no big deal, I can change this to whatever @drbrain prefers.

@slonopotamus
Copy link

For some reason, Windows builds pass in your branch even though there was an error in tests.

@deivid-rodriguez
Copy link
Contributor Author

Yeah, bug in hoe-travis.

@slonopotamus
Copy link

Yeah, bug in hoe-travis.

I'm not sure. See my run. The only difference is that you combined rake travis:before -t + rake travis + rake travis:after -t in a single step, why I run each command as a separate step.

@deivid-rodriguez
Copy link
Contributor Author

Right, that's because the default Windows shell doesn't seem to have an -e mode enabled (inmediately exit when a command fails), so your way is definitely safer on Windows. However, as you can see the rake travis:before -t step didn't fail in your run either and that's a bug in travis-hoe.

@slonopotamus
Copy link

I suggest splitting Windows CI into a separate PR. This is not a regression (net-http-persistent never had Windows CI before), but it severely increases amount of changes. And it might be that net-http-persistent test suite simply doesn't work on Windows and needs even more fixes.

@slonopotamus
Copy link

default Windows shell doesn't seem to have an -e mode enabled

Because it's PowerShell) However, run: workflow step allows to choose what shell to use.

@deivid-rodriguez
Copy link
Contributor Author

deivid-rodriguez commented Dec 14, 2020

Yeah, I splitted the tests like you did 👍.

I suggest splitting Windows CI into a separate PR. This is not a regression (net-http-persistent never had Windows CI before), but it severely increases amount of changes. And it might be that net-http-persistent test suite simply doesn't work on Windows and needs even more fixes.

Agreed, but I want to get everything working first. I can split it afterwards if maintainers prefer so. This repo is barely attended so I feel relying on many dependant PRs might make things slower and less likely to get attention 🤷‍♂️.

@deivid-rodriguez deivid-rodriguez marked this pull request as draft December 14, 2020 21:24
@deivid-rodriguez
Copy link
Contributor Author

deivid-rodriguez commented Dec 17, 2020

I managed to repro the issue, although I had to add a bunch of patches to dependent libraries. I guess I'll start by submitting patches upstream.

@slonopotamus
Copy link

That might take some time before upstream libs accept changes and make releases with them.

That's why I suggested splitting: travis-ci.org that is currently used for CI is going to stop existing on December, 31. So moving to a different CI has a value on its own.

@deivid-rodriguez
Copy link
Contributor Author

Sure, I'm not saying no to your suggestion, I'm just waiting for some input from maintainers while working on reproducing and fixing the current issue in CI. As soon as maintainers tell me what they expect, I can quickly amend this PR :)

@deivid-rodriguez
Copy link
Contributor Author

It's all green now, by the way https://github.com/deivid-rodriguez/net-http-persistent/runs/1572593796?check_suite_focus=true.

@deivid-rodriguez deivid-rodriguez force-pushed the github_actions branch 2 times, most recently from d232761 to 8e317fc Compare December 22, 2020 12:49
@deivid-rodriguez
Copy link
Contributor Author

Made some progress here by completely getting rid of hoe-travis, which makes sense to me since we are migrating away from travis 😅

@deivid-rodriguez
Copy link
Contributor Author

I didn't find time to follow up on this yet, but at least I created a WIP PR to hoe to see how maintainers there feel about my patches.

@deivid-rodriguez
Copy link
Contributor Author

Both my PR and the PR to hoe adding a CI have been unattended for a while. Maybe an alternative would be to move away from hoe here. Although this PR itself has been unattended too, so I'm not really sure how to proceed.

@petergoldstein
Copy link
Contributor

@deivid-rodriguez To keep this up to date, can you add '3.0' (note the quotes) and 3.1 to the CI matrix?

It doesn't seem necessary and we're moving away from TravisCI.
@deivid-rodriguez
Copy link
Contributor Author

Done, hopefully this repository gets some love again.

It's easier to manage the `Gemfile` directly.
Changelog seems managed directly, and manifest is checked by `rake
check_manifest`.
I don't see where it's used.
Same thing, but https.
@deivid-rodriguez deivid-rodriguez force-pushed the github_actions branch 6 times, most recently from 94aa6ef to d2c3332 Compare February 9, 2022 11:34
I want to add a little gem to manage the Rakefile to replace Hoe (which
does not support Windows). But this gem does not support Ruby 2.3.

The easiest fix is to drop Ruby 2.3 support.
Instead, use explicit gemspec + `Rake::Manifest::Task` +
`Rake::TestTask`.
@deivid-rodriguez
Copy link
Contributor Author

deivid-rodriguez commented Feb 9, 2022

Alright, I updated this PR so it doesn't depend on any fixes in Hoe.

Now it does the following:

Development Environment

  • Migrates CI to GitHub Actions.
  • Adds Windows & JRuby to CI.
  • Adds Ruby 3.0 and 3.1 to CI matrix.
  • Replaces Hoe with other tools that have no issues on Windows.

User facing changes

  • Drop support for Ruby 2.3 (could be fixed but rake-manifest which I used for managing the Manifest file needs that).
  • Restore JRuby + Windows support.

I'll set it as ready!

@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review February 9, 2022 11:45
.github/workflows/test.yml Outdated Show resolved Hide resolved
@drbrain drbrain merged commit 857c3ba into drbrain:master Mar 11, 2022
@deivid-rodriguez deivid-rodriguez deleted the github_actions branch March 12, 2022 05:37
@deivid-rodriguez
Copy link
Contributor Author

❤️

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.

on windows jruby: getrlimit not supported on this platform Migrate away from travis-ci.org
5 participants