Add GitHub Actions CI and an ActiveSupport compatibility matrix#582
Merged
Merged
Conversation
- CI (replaces Travis): a minimal Ruby × ActiveSupport covering matrix — each supported Ruby (3.1–4.0) paired with one supported ActiveSupport (7.0/7.1/7.2/8.0/8.1), plus an experimental ruby-head + Rails-main cell. Credential-free: runs `bundle exec rake test` (unit-only; tests stub all Xero HTTP). Per-cell ActiveSupport pinned via gemfiles/ + BUNDLE_GEMFILE. - Load ActiveSupport's deprecation framework before cherry-picking core_ext: some versions emit a deprecation at load time (AS 7.1 array, AS 8.2 time) referencing `ActiveSupport.deprecator` / `ActiveSupport::Deprecation`. Require `active_support/deprecation` (+ `active_support/deprecator`, absent before 7.1) first, rather than all of active_support. - Set `required_ruby_version >= 3.1` and the `activesupport` floor to `>= 7.0`. - Add CI and gem-version badges to the README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CloCkWeRX
approved these changes
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the (effectively empty) Travis config with a GitHub Actions workflow that runs the unit suite across a Ruby × ActiveSupport matrix.
CI (
.github/workflows/ci.yml): runsbundle exec rake test(unit-only; the suite stubs all Xero HTTP, so it needs no credentials or secrets).Matrix — a minimal covering set: each supported Ruby once and each supported ActiveSupport once, pinned per-cell via
gemfiles/+BUNDLE_GEMFILE:main(experimental, non-blocking)Supported versions: sets
required_ruby_version >= 3.1and raises theactivesupportfloor to>= 7.0.README: adds CI and gem-version badges.
Removes
.travis.yml.Notable: a load-time crash on some ActiveSupport versions
Building the matrix surfaced a real bug.
lib/xeroizer.rbcherry-picks ActiveSupport core extensions (e.g.active_support/core_ext/array) without first loadingactive_support. Some AS versions emit a deprecation at load time from those files:array/conversionscallsActiveSupport.deprecatormain) —time/conversionsreferencesActiveSupport::Deprecation…both undefined unless the deprecation framework is already loaded, so
require 'xeroizer'raisesNoMethodError/NameError.The fix loads just the deprecation framework (not all of ActiveSupport):
The
rescue LoadErroris necessary:active_support/deprecatoronly exists from AS 7.1, andLoadErrorisn't aStandardError(so a barerescuemodifier wouldn't catch it).Testing
All cells pass — 191 tests, 0 failures — including
ruby-head+ Railsmain. The change touches no test files.