Skip to content

ci: adopt shared reusable CI workflow and support Ruby 4.0#34

Merged
dduugg merged 3 commits into
mainfrom
ci/adopt-shared-workflow
Jul 1, 2026
Merged

ci: adopt shared reusable CI workflow and support Ruby 4.0#34
dduugg merged 3 commits into
mainfrom
ci/adopt-shared-workflow

Conversation

@dduugg

@dduugg dduugg commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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

  • Adopt the shared CI workflow. Replaces the hand-rolled rspec / srb tc / rubocop matrix with a call to rubyatscale/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.
  • Bump minitest (5.25.5 → 6). The old lock pinned minitest 5.25.5, whose gemspec caps Ruby at < 4.0, so bundle install failed outright on Ruby 4.0.
  • Bump rubocop (1.74.0 → 1.88.1) (plus transitive deps: parser, prism, rubocop-ast, etc.). RuboCop 1.74 rejects RUBY_VERSION.to_f (4.0) with unknown Ruby version, which broke every spec that parses source via RuboCop::ProcessedSource (lib/query_packwerk/file_cache.rb).
  • Annotate two methods with inline rubocop:disable Naming/PredicateMethod. RuboCop 1.88 enables this new cop, which flags QueryPackwerk::Package#enforce_dependencies and #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.
  • Bump 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 install failure and a genuine runtime error, both now fixed.

Notes

  • The previous jobs are all covered by the shared workflow's defaults (bundle exec rspec, bundle exec srb tc, bundle exec rubocop).
  • Check names change (e.g. call-workflow-from-shared-config / Run tests: Ruby 4). No enforced required-status-checks reference the old names, so merging is unaffected.
  • Verified locally on Ruby 4.0: rspec (60 examples, 0 failures), rubocop (no offenses), srb tc (no errors). CI is green on 3.3 / 3.4 / 4.0.

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.
@dduugg dduugg requested a review from a team as a code owner July 1, 2026 19:52
@github-project-automation github-project-automation Bot moved this to Triage in Modularity Jul 1, 2026
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.
@dduugg dduugg force-pushed the ci/adopt-shared-workflow branch from 8ff7db0 to 726de2c Compare July 1, 2026 20:19
Comment thread Gemfile.lock Outdated
@dduugg dduugg changed the title ci: adopt shared reusable CI workflow (adds Ruby 4.0) ci: adopt shared reusable CI workflow and support Ruby 4.0 Jul 1, 2026
@dduugg dduugg merged commit af2c0b9 into main Jul 1, 2026
6 checks passed
@dduugg dduugg deleted the ci/adopt-shared-workflow branch July 1, 2026 20:24
@github-project-automation github-project-automation Bot moved this from Triage to Done in Modularity Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant