Skip to content

Run the full test suite across supported Rubies and platforms - #145

Open
tas50 wants to merge 1 commit into
chef:mainfrom
tas50:ci-run-all-tests
Open

tas50 wants to merge 1 commit into
chef:mainfrom
tas50:ci-run-all-tests

Conversation

@tas50

@tas50 tas50 commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Before this change, CI skipped part of the test suite:

Before After
Rubies tested 3.1, 3.4 (Buildkite) 3.1, 3.2, 3.3, 3.4, 4.0
Platforms Linux, Windows Linux, Windows, macOS
Cucumber features never run ported to RSpec, run everywhere

New unit workflow

.github/workflows/unit.yml runs rake spec on a matrix of Ruby 3.1-4.0 × ubuntu-latest, windows-latest and macos-latest, using ruby/setup-ruby with bundler caching. Chef's Buildkite setup has no Windows image for Ruby 3.2 or 4.0 (rubydistros/windows-2019 publishes only 3.1, 3.3 and 3.4), so GitHub Actions is the only way to cover them. BUNDLE_WITHOUT: debug:docs skips pry/byebug and yard, which the specs don't need.

The Buildkite pipeline is unchanged. Its check is probably required by branch protection. Once this workflow has proven itself, maintainers may want to retire it.

Cucumber → RSpec

features/ had four scenarios. None of them had run in years: cucumber isn't in the Gemfile or gemspec, no rake task or CI job called it, and one step definition file was empty. The scenarios are ported to spec/mixlib/config_usage_spec.rb, and features/ is removed. The file-loading scenario is now the only spec that reads a real config file from disk (spec/fixtures/sample_config.rb). Every other from_file spec stubs the read.

Rakefile

Both require "bundler/gem_tasks" and Bundler::GemHelper.install_tasks were present, so build and release each ran their actions twice (Rake::Task["build"].actions.size was 2). The duplicate is removed. This PR also fixes the "uploaeded" typo, because spellcheck flags any file a PR touches. #143 makes the identical fix.

Not changed: minimum Ruby

required_ruby_version stays at >= 3.1. Ruby 3.1 is EOL, but Chef Infra Client 18 ships it, and raising the floor would cut Chef 18 off from future mixlib-config releases. The matrix now tests that floor alongside every newer Ruby.

Merge notes

This PR and #144 both edit .github/copilot-instructions.md in the directory-tree section, so whichever merges second will need a small rebase. The added cspell entry (Rovo) is identical in both PRs.

Testing

  • bundle exec rake spec passes locally on Ruby 4.0.7 (160 examples). cookstyle, actionlint and cspell are clean.
  • To confirm the ported file-loading spec really reads the file, I changed the fixture's value and watched the spec fail.

@tas50
tas50 requested review from a team and jaymzh as code owners September 25, 2026 21:03
@jaymzh

jaymzh commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

Buildkite is formally deprecated at Progress. Theoretically they're not going to move to Drone, but I think this is clearly the "right thing" at least for now.

Go ahead and kill the BK in this PR and then @tpowell-progress can nuke the BK requirment when he merges this.

- Add a GitHub Actions unit workflow that runs the specs on Ruby 3.1,
  3.2, 3.3, 3.4 and 4.0 on Linux, Windows and macOS. Buildkite only
  covers 3.1 and 3.4, and there is no Buildkite Windows image for 3.2
  or 4.0.
- Port the four Cucumber scenarios to RSpec and remove features/.
  Cucumber was not in the bundle and nothing ran it, so these tests
  had not run in years. The ported file-loading scenario is the only
  spec that reads a real config file from disk.
- Stop registering the Bundler gem tasks twice in the Rakefile, which
  made build and release run their actions twice.

Signed-off-by: Tim Smith <tsmith84@proton.me>
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