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

Migrate CI to Github Actions #497

Merged
merged 3 commits into from
Jun 10, 2021

Conversation

deivid-rodriguez
Copy link
Contributor

I was working on #494 but I noticed travis-ci.org shutdown was imminent so I figured I would migrate the CI to Github Actions.

I didn't migrate the jruby 9.0 entries, because they're being removed at #491, so I'll wait for that and then rebase this PR.

@deivid-rodriguez
Copy link
Contributor Author

Github Actions needs to be enabled in this repo so that CI runs, but you can see a passing CI on my fork: https://github.com/deivid-rodriguez/warbler/actions/runs/922559866.

@olleolleolle
Copy link
Member

@deivid-rodriguez Alright, ready!

@deivid-rodriguez
Copy link
Contributor Author

Rebased! You'll need to enabled Github Actions in the repo settings.

@olleolleolle olleolleolle mentioned this pull request Jun 10, 2021
9 tasks
@olleolleolle
Copy link
Member

olleolleolle commented Jun 10, 2021

@enebo @headius Would you have access to allowing the GitHub Actions CI in Settings for this repo?

@slonopotamus
Copy link

I believe that you don't need to enable anything and GitHub Actions will start working for this repo as soon as workflow files are merged.

@deivid-rodriguez
Copy link
Contributor Author

You need to go to "Settings > Actions", and then select an appropriate radio button under "Actions Permissions" such as "Allow all actions". Not sure whether it gets automatically enabled if workflow files land on master, but manually enabling it is better to get CI feedback beforehand and be able to merge a working setup.

@slonopotamus
Copy link

Even if you enable that (in case it is disabled which I doubt), I think GitHub Actions won't run for this PR. Because current repository doesn't contain a workflow file that would allow running builds against PRs.

@deivid-rodriguez
Copy link
Contributor Author

Yeah, it would because I'm temporarily specifying the current branch name in the workflows.

@deivid-rodriguez
Copy link
Contributor Author

I've already done this many times.

@deivid-rodriguez
Copy link
Contributor Author

In any case, I'm testing this against my fork, so no need to enable anything, I can ping you when it's ready, and we can merge directly and get it running on master 👍.

@deivid-rodriguez deivid-rodriguez marked this pull request as draft June 10, 2021 17:48
@enebo
Copy link
Member

enebo commented Jun 10, 2021

@olleolleolle @deivid-rodriguez I see an actions tab and it is suggesting I either pick a work flow or commit the normal GHA files to the repo. So I think it is enabled but not displaying because we have not committed the files yet?

@deivid-rodriguez
Copy link
Contributor Author

Yeah, that's normal. As @slonopotamus said, once we land this PR workflows should start running. Can you check the permissions enabled at "Settings > Actions"? Maybe my trick only works for branches inside the repository, not from branches in forks.

@enebo
Copy link
Member

enebo commented Jun 10, 2021

@deivid-rodriguez It is set to 'allow all actions' which appears to be any location and any author.

@deivid-rodriguez
Copy link
Contributor Author

Yeah, thanks!

So indeed my trick only works for branches inside the repository (which makes sense). That's why actions are running fine on my fork without having any workflow files on master: https://github.com/deivid-rodriguez/warbler/actions. This is good enough, I'll ping you when I have something ready.

It makes it easier to configure a Github Actions matrix.
@deivid-rodriguez deivid-rodriguez force-pushed the github_actions branch 2 times, most recently from a4ef543 to 0956bc1 Compare June 10, 2021 20:40
On Github Actions, jruby-head installation is more standard, so it comes
with a very new bundler installed as a default gem. This means that
unless we use a rubygems version that can switch the version of bundler
according to what's locked in Gemfile.lock, things won't work because
the default version of bundler (bundler 2) will be used and that doesn't
work yet.

So, in preparation for migrating to Github Actions, I'm updating
rubygems to the minimal version that includes this feature and hope that
it works fine otherwise.
@deivid-rodriguez
Copy link
Contributor Author

Alright, this should be ready now. Passing CI in my fork is here: https://github.com/deivid-rodriguez/warbler/actions/runs/926438002.

@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review June 10, 2021 20:56
Copy link
Member

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

Focused and clear!

@olleolleolle olleolleolle merged commit 8d29cd7 into jruby:master Jun 10, 2021
@deivid-rodriguez deivid-rodriguez deleted the github_actions branch June 10, 2021 22:32
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.

5 participants