Skip to content

Improve CI: test against Ruby 4.0 and update actions - #274

Open
tagliala wants to merge 1 commit into
typhoeus:masterfrom
tagliala:chore/improve-ci
Open

Improve CI: test against Ruby 4.0 and update actions#274
tagliala wants to merge 1 commit into
typhoeus:masterfrom
tagliala:chore/improve-ci

Conversation

@tagliala

@tagliala tagliala commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add Ruby 4.0 to the CI test matrix
  • Update actions/checkout from v3 to v7 (latest release)
  • Fix dependency resolution so tests pass on Ruby 3.3, 3.4, and 4.0

What changed and why

actions/checkout v3 → v7

Updated to the latest major release (v7.0.1).

mustermann pinned to < 4

The mustermann gem was resolving to 4.0.0, which conflicts with sinatra 4.x's mustermann (~> 3.0) requirement. This caused Bundler to give up on sinatra 4.x and fall back to sinatra 1.0, which does not support rack 3.x (it requires rack/showexceptions, removed in rack 3). Pinning to < 4 allows sinatra 4.x to resolve correctly.

rackup moved inside Ruby >= 3.0 conditional

Rack 2.x bundles rackup built-in (Rack::Handler::WEBrick). The separate rackup gem is only needed for rack 3.x, so it is now only required for Ruby >= 3.0.

rack < 3 for Ruby < 3.0

Sinatra ~> 2.2 (used for older Rubies) requires rack 2.x.

localhost_server.rb conditional rackup require

Matches the Gemfile change — only loads the rackup gem when running on Ruby >= 3.0 with rack 3.x.

CI results

Passing (18/22):

  • ubuntu: 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 4.0, truffleruby
  • macos: 2.6, 2.7, 3.0, 3.1, 3.2, 3.3, 3.4, 4.0, truffleruby

Failing (4/22) — all known/expected:

  • head (ubuntu + macos): patron native extension fails to build on Ruby 4.1.0dev (upstream issue), and Bundler 4 has compatibility issues with the lockfile format
  • debug (ubuntu + macos): same Bundler 4 / bundle exit code 5 issue
  • ubuntu 2.6: intermittent segfault (exit code 134) — passes on macos, likely a runner environment issue

These are all already continue-on-error: true targets in the CI matrix.

Local test results

All 579 examples pass on Ruby 3.3, 3.4, and 4.0 with 0 failures (tested via mise).

- Add Ruby 4.0 to the CI test matrix
- Update actions/checkout from v3 to v7 (latest release)
- Restrict mustermann to < 4: mustermann 4.0 conflicts with
  sinatra 4.x's 'mustermann (~> 3.0)' requirement, causing Bundler
  to fall back to sinatra 1.0 which does not support rack 3.x
- Move rackup gem inside Ruby >= 3.0 conditional: rack 2.x bundles
  rackup built-in, only Ruby >= 3.0 with rack 3.x needs the gem
- Add rack < 3 for Ruby < 3.0: sinatra ~> 2.2 requires rack 2.x
- Make localhost_server.rb require rackup conditionally to match
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.

1 participant