Skip to content

Replace dead Travis config with GitHub Actions - #2

Merged
facundofarias merged 2 commits into
fix/flush-before-child-exitfrom
ci/github-actions
Sep 16, 2026
Merged

facundofarias merged 2 commits into
fix/flush-before-child-exitfrom
ci/github-actions

Conversation

@facundofarias

@facundofarias facundofarias commented Sep 16, 2026 •

Copy link
Copy Markdown

Stacked on #1. Based on fix/flush-before-child-exit because the suite cannot load without the require 'forwardable' from that PR. Merge #1 first; this will retarget to master automatically.

This repo has never run tests

The only CI config was a .travis.yml pinning Ruby 2.2.3 and bundler 1.10.6. It was dead three times over:

  1. Travis was never connected to this fork. Created 2026-08-20; a fork does not inherit the upstream's CI integration, and nobody enabled it here.
  2. travis-ci.org shut down in 2021. The config predates that and was never migrated.
  3. Ruby 2.2.3 is long EOL and would not resolve modern dependencies anyway.

Measured on #1's head:

Check runs 0
Registered Actions workflows 0
Commit statuses 1 — CodeRabbit, not tests

The consequence was not theoretical. The suite could not even load (extend Forwardable with nothing requiring forwardable), and once that was fixed, 14 of 73 examples failed. Nobody could have known.

The workflow

Ruby Runner Gates?
2.7 ubuntu-22.04 yes — what DeployHQ runs today
3.4 ubuntu-24.04 no — advisory via continue-on-error

3.4 reports without blocking, so a failure there can never block a fix for the Ruby actually in production. It exists to de-risk the in-flight 3.4.9 upgrade; promote it to required once consumers have moved.

ubuntu-22.04 is required for 2.7 specifically — setup-ruby ships no 2.7 build for ubuntu-24.04.

Two details the workflow has to get right

The suite is not hermetic. spec_helper purges real queues through Bunny, so a RabbitMQ service container must be healthy before any example runs. Hence the service block and its rabbitmq-diagnostics -q ping health check.

The broker user is deliberately not guest. RabbitMQ restricts guest to loopback, and a service container is reached over the docker bridge — so guest authentication is refused. This is the classic way a RabbitMQ-backed Actions workflow fails on first run. The workflow provisions a leveret user instead.

bundler-cache is off on purpose: this gem ships no Gemfile.lock (see #1), so there is no stable key to cache against, and the dependency set is three gems.

Scope note — two changes beyond "add a workflow"

Flagging rather than burying:

  • require 'ostruct' in spec_helper. Three spec files build doubles with OpenStruct; ostruct is no longer loaded implicitly, so every example in those files errored before running. This is all 14 of the failures above — one line fixes them. Adding CI that is red on arrival would be worse than no CI, so this belongs here.
  • spec_helper now reads LEVERET_AMQP_URL, falling back to the same amqp://guest:guest@localhost:5672 developers already use. Required by the non-guest broker user above. Local runs are unchanged.

Testing

Verified locally on 2.7.8, both with and without LEVERET_AMQP_URL set:

73 examples, 0 failures

I could not verify 3.4 locally — rvm's 3.4.9 gemset has a bundler shim pinned to 2.1.4, which is itself broken on Ruby 3.4 (uninitialized constant DidYouMean::SPELL_CHECKERS). That is a local environment problem, not the gem's, and it is exactly why 3.4 is advisory here rather than gating: the first honest 3.4 signal will come from this workflow's own first run.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Added automated CI coverage across supported Ruby versions and Ubuntu environments.
    • Added RabbitMQ service setup and health checks for test runs.
    • Made the AMQP broker URL configurable, with a local default.
    • Ensured specs load successfully when using OpenStruct.
  • Chores
    • Replaced the previous Travis CI configuration with GitHub Actions-based testing.

This repo has never run tests. The only CI config was a .travis.yml pinning Ruby
2.2.3 and bundler 1.10.6, and it was dead three times over: Travis was never
connected to this fork (created 2026-08-20; a fork does not inherit the
upstream's CI integration), travis-ci.org shut down in 2021, and Ruby 2.2.3 is
long EOL. The PR that prompted this had zero check runs and zero registered
workflows.

The consequence was not theoretical. The suite could not even load -- `extend
Forwardable` with nothing requiring forwardable -- and once that was fixed, 14 of
73 examples failed. Nobody could have known.

Adds a workflow that runs rspec on two rubies:

  2.7  (ubuntu-22.04) -- what DeployHQ runs today. Gates.
  3.4  (ubuntu-24.04) -- where the app is heading. Advisory via
       continue-on-error, so a failure there cannot block a fix for the Ruby
       actually in production. Promote to required once consumers have moved.

ubuntu-22.04 is required for 2.7 specifically: setup-ruby ships no 2.7 build for
ubuntu-24.04.

Two details the workflow has to get right:

  - The suite is NOT hermetic. spec_helper purges real queues through Bunny, so a
    RabbitMQ service container has to be healthy before any example runs.
  - The broker user is deliberately NOT `guest`. RabbitMQ restricts guest to
    loopback, and a service container is reached over the docker bridge, so guest
    authentication is refused. The workflow provisions a `leveret` user instead.

That last point needs spec_helper to be configurable, so it now reads
LEVERET_AMQP_URL and falls back to the same amqp://guest:guest@localhost:5672
developers already use. Local runs are unchanged; verified both paths.

bundler-cache is off on purpose: this gem ships no Gemfile.lock, so there is no
stable key to cache against, and the dependency set is small.

Verified locally on 2.7.8 with and without LEVERET_AMQP_URL set: 73 examples,
0 failures both ways.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 0f4c67fc-5b73-4323-aef7-fb2410971b49

📥 Commits

Reviewing files that changed from the base of the PR and between ab36222 and 0e6d3a7.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Included review availability: 1 review is currently available. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.


Walkthrough

The pull request replaces Travis CI with GitHub Actions for Ruby 2.7 and Ruby 3.4. The workflow provisions RabbitMQ and runs RSpec. The spec helper adds ostruct and supports a configurable AMQP URL.

Changes

CI and RSpec Environment Update

Layer / File(s) Summary
GitHub Actions CI execution
.github/workflows/ci.yml, .travis.yml
GitHub Actions runs RSpec on Ruby 2.7 and Ruby 3.4 with RabbitMQ services. Ruby 2.7 failures block the workflow, while Ruby 3.4 failures are advisory. The Travis CI configuration is removed.
RSpec environment configuration
spec/spec_helper.rb
The spec helper explicitly loads ostruct and reads LEVERET_AMQP_URL, with a local RabbitMQ URL as the default.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 0e6d3

No confirmed merge-blocking behavior is present in the available change evidence.

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: removing the obsolete Travis CI configuration and replacing it with GitHub Actions.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/github-actions

Warning

Git: CodeRabbit could not clone the repository, so clone-backed analysis was skipped and this review may be incomplete. Verify repository clone access, such as SSH credentials, before requesting another full review. If clone access is intentionally unavailable, use path_filters to narrow the review scope.


Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-16T06:56:25.917986Z ab36222 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

The 2.7 job failed at Install dependencies, before a single spec ran:

    The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22
    bundler requires Ruby version >= 3.2.0. The current ruby version is 2.7.8.225

`gem install bundler` with no constraint resolves to the newest release, which
now requires Ruby >= 3.2. On 2.7 it cannot install at all.

Pin it per Ruby through setup-ruby's own `bundler` input rather than a bare
`gem install`, so the version is fixed by the matrix instead of resolved at run
time: 2.4.22 on 2.7, latest on 3.4. That 2.4.22 is the same pin the consuming
app documents as the last line supporting Ruby 2.7 -- and specifically not
1.17.3, which has a default-gem activation bug that has caused production deploy
outages there.

Also prints `bundle --version` before installing, so the next failure of this
shape is one line of log rather than an inference.

The 3.4 job already passed on the previous run -- 73 examples, 0 failures against
the RabbitMQ service container -- so the service, the non-guest broker user and
LEVERET_AMQP_URL are all confirmed working. Only bundler was wrong.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@facundofarias
facundofarias merged commit c6fbb17 into fix/flush-before-child-exit Sep 16, 2026
3 checks passed
@facundofarias
facundofarias deleted the ci/github-actions branch September 16, 2026 09:26
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.

2 participants