ci: adopt shared reusable CI workflow and support Ruby 4.0#34
Merged
Conversation
Replace the hand-rolled test/type-check/lint matrix with a call to rubyatscale/shared-config's reusable ci.yml, which already tests Ruby 3.3, 3.4, and 4.0. Keeps this repo's CI in lockstep with the org.
Adding Ruby 4.0 to CI surfaced two incompatibilities: - Gemfile.lock pinned minitest 5.25.5, whose gemspec caps Ruby < 4.0, breaking `bundle install` on 4.0. - RuboCop 1.74.0 rejects `RUBY_VERSION.to_f` (4.0) with 'unknown Ruby version', failing the specs that parse source via RuboCop::ProcessedSource. Bump both (rubocop 1.74->1.88, minitest ->6) plus transitive deps. RuboCop 1.88 enables Naming/PredicateMethod, which flags enforce_dependencies/ enforce_privacy; those mirror packwerk's public API and can't be renamed, so each is annotated with an inline rubocop:disable comment.
8ff7db0 to
726de2c
Compare
dduugg
commented
Jul 1, 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
Brings query_packwerk's CI onto Ruby 4.0 by adopting the shared reusable workflow, and fixes the Ruby 4.0 incompatibilities that switch surfaced.
Changes
rspec/srb tc/rubocopmatrix with a call torubyatscale/shared-config/.github/workflows/ci.yml@main, which already tests Ruby 3.3, 3.4, and 4.0 plus type-checking and linting. Keeps this repo in lockstep with the ~10 other rubyatscale repos on the shared workflow — no more per-repo drift when the supported Ruby set changes.minitest(5.25.5 → 6). The old lock pinnedminitest 5.25.5, whose gemspec caps Ruby at< 4.0, sobundle installfailed outright on Ruby 4.0.rubocop(1.74.0 → 1.88.1) (plus transitive deps: parser, prism, rubocop-ast, etc.). RuboCop 1.74 rejectsRUBY_VERSION.to_f(4.0) withunknown Ruby version, which broke every spec that parses source viaRuboCop::ProcessedSource(lib/query_packwerk/file_cache.rb).rubocop:disable Naming/PredicateMethod. RuboCop 1.88 enables this new cop, which flagsQueryPackwerk::Package#enforce_dependenciesand#enforce_privacy. Those intentionally mirror packwerk's public API naming (no?suffix) and are part of this gem's public API, so they can't be renamed — the disables are scoped to just those definitions rather than turning the cop off globally.BUNDLED WITH(bundler 4.0.10 → 4.0.15).Why
The previous CI only ran Ruby 3.3/3.4, so these Ruby 4.0 incompatibilities were invisible. Adding 4.0 coverage exposed a genuine
bundle installfailure and a genuine runtime error, both now fixed.Notes
bundle exec rspec,bundle exec srb tc,bundle exec rubocop).call-workflow-from-shared-config / Run tests: Ruby 4). No enforced required-status-checks reference the old names, so merging is unaffected.rspec(60 examples, 0 failures),rubocop(no offenses),srb tc(no errors). CI is green on 3.3 / 3.4 / 4.0.