Skip to content

replace travis ci script with github action #1616

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

Merged
merged 5 commits into from
Jun 30, 2021
Merged

replace travis ci script with github action #1616

merged 5 commits into from
Jun 30, 2021

Conversation

peff
Copy link
Member

@peff peff commented Jun 29, 2021

Our CI is currently broken, since travis-ci.org went away. This replaces it with a GitHub Action.

I wrote this from scratch before realizing that @jnavila had already opened #1562. It's substantially similar, but I broke apart the various steps a bit more. It also has a minor fix to match up the ruby versions in the gemfile and the CI environment. So I'd be inclined to just proceed with this one and close #1562, but if anybody has strong feelings, we can go the other way.

Fixes #1559.

peff added 3 commits June 29, 2021 15:51
Since travis-ci.org has shut down, we no longer have functioning CI for
pull requests. Let's translate this to a GitHub Actions workflow.

Our set of actual tests is still pretty lousy, but this at least
gets our basic sanity checks running again.
Otherwise bundler may complain if ruby-setup's 2.7.x differs from what's
in our Gemfile.
This has some security fixes, though none that should impact us. Mostly
I want to make sure the bumping process works with CI (it would be nice
if we could read the .ruby-version or Gemfile from the CI code; I think
it's possible but non-trivial).
We trigger CI on both "push" and "pull_request". The latter is necessary
to get CI results for people opening a PR from their own fork. The
former is not strictly necessary, but it's nice to get the PR running as
soon as we know about the commits, so that it's often finished by the
time you've finished opening up the PR.

But this does result in duplicate runs for branches pushed directly into
the repo: once when the branch is pushed, and once when the PR is
opened. We could get around this by skipping the workflow when we've
already got the same job running, but that's more complicated. Let's
just drop the "push" trigger. The CI here is pretty fast anyway (at
least once the bundler bits are all cached, but that should be the case
for any PR that doesn't update gems).
@peff peff temporarily deployed to git-scm-pr-1616 June 29, 2021 20:36 Inactive
@peff peff temporarily deployed to git-scm-pr-1616 June 29, 2021 20:39 Inactive
If we omit it, it will use .ruby-version by default, which is exactly
what we want! (I had simply cargo-culted the original config).
@peff peff temporarily deployed to git-scm-pr-1616 June 29, 2021 20:45 Inactive
@peff peff merged commit 8e80f3d into main Jun 30, 2021
@peff peff deleted the actions-ci branch June 30, 2021 21:50
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.

Move from Travis CI to GitHub Actions
2 participants