-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Declare integration tests with less repetition #2420
Declare integration tests with less repetition #2420
Conversation
Here's an example of a CHANGELOG.md entry: * [#2420](https://github.com/ruby-grape/grape/pull/2420): Declare integration tests with less repetition - [@dgutov](https://github.com/dgutov). Generated by 🚫 Danger |
This is much better. I'll merge. I think we should be able to collapse a little further - the two tasks are very similar ( |
The separate step is now pretty short. We could remove it with some interpolations and long That seems hard to avoid without using an environment binding (which requires an extra step as well), or something more drastic like pre-generating the matrix in an additional process call (https://stackoverflow.com/a/65434401/615245), which is +1 step and +1 level of indirection. So, this works, but it might not be an improvement: dgutov@af797e9 |
I kinda agree. Do we need to do |
No, it's |
The |
It adds the exclusion of integration tests: spec.exclude_pattern = 'spec/integration/**/*_spec.rb' |
You can add I don't know if it's better, but maybe. |
Sure. It's just that when these two invocations are different enough (we need to either call different commands in these two cases, or add different arguments anyway), it's difficult to come up with a readable way to DRY this more. |
How do you feel about #2423? |
Something discussed in the other PR.
It's not exactly the same behavior - each "integration" runs with the specified version of Ruby only, and doesn't run the regular test suite. But this seems easier to read anyway.
WDYT?
If running Rack 2 and 3 with all Ruby versions is really needed, I suppose integrations could be defined as a separate step (with its own matrix).