Conversation
ArturT
approved these changes
Jan 8, 2024
| export KNAPSACK_PRO_TEST_DIR=turnip | ||
| export KNAPSACK_PRO_TEST_FILE_PATTERN="turnip/**/*.feature" | ||
| bundle exec rake "knapsack_pro:queue:rspec[-r turnip/rspec]" | ||
| - run: |
Member
There was a problem hiding this comment.
You are adding Minitest steps to the jobs that are supposed to be testing the matrix of Ruby & RSpec versions.
I think we could make it cleaner. You could add new jobs to the workflow for testing the matrix of Ruby & Minitest versions. Thanks to that:
- we have the option to test different Minitest versions in the future.
- we would avoid testing the matrix of different Minitest & RSpec versions because it does not make sense. The testing frameworks are independent.
You could create a new story for that to not hold off on the release of this fix.
workflows:
tests:
jobs:
- unit
- integration-regular-rspec:
name: integration-regular__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
matrix:
parameters:
ruby: ["3.0", "3.1", "3.2"]
rspec: ["3.10.2", "3.11.0", "3.12.2"]
- integration-queue-rspec:
name: integration-queue__ruby-<< matrix.ruby >>__rspec-<< matrix.rspec >>
matrix:
parameters:
ruby: ["3.0", "3.1", "3.2"]
rspec: ["3.10.2", "3.11.0", "3.12.2"]
- integration-regular-minitest:
name: integration-regular__ruby-<< matrix.ruby >>__minitest-<< matrix.minitest >>
matrix:
parameters:
ruby: ["3.0", "3.1", "3.2"]
minitest: ["x.x.x", ...]
- integration-queue-minitest:
name: integration-queue__ruby-<< matrix.ruby >>__minitest-<< matrix.minitest >>
matrix:
parameters:
ruby: ["3.0", "3.1", "3.2"]
minitest: ["x.x.x", ...]
Contributor
Author
There was a problem hiding this comment.
✅ (I had to reduce the parallelism to avoid jobs being queued)
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.
Rails in
test/test_helper.rbincludes:that contains:
which calls
Minitest.autorun, which, in turn, installs anat_exitthat will run Minitest tests.This is useful when you don't want to call
Minitest.runexplicitly. But we actually do so in the Knapsack Pro runner.We forgot to add the
class_variable_setas part of 6849d1f (make sure to read the link to the Minitest issue in the commit body).This change is not needed in Regular Mode because we don't call
Minitest.run(and we rely on the autorun) in that case.Reproduction steps
::Minitest.class_variable_set('@@installed_at_exit', true)cd rails-app-with-knapsack_probin/knapsack_pro_queue_minitestYou can also see it on CI (notice the last few lines):