-
Notifications
You must be signed in to change notification settings - Fork 173
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
Add Matrix to Buildkite pipeline file #723
Conversation
Is it possible to reduce the duplication even more by doing something like this? - label: ":ruby: Ruby {{ matrix.ruby-version }} unit tests"
matrix:
adjustments:
- with:
ruby-version: "2.0"
bundle-version: "1.12.0"
- with:
ruby-version: "2.1"
bundle-version: "1.12.0"
- with:
ruby-version: "2.2"
bundle-version: "1.12.0"
gemsets: "test sidekiq"
- with:
ruby-version: "2.3"
bundle-version: "1.12.0"
gemsets: "test sidekiq"
- with:
ruby-version: "2.4"
gemsets: "test sidekiq"
- with:
ruby-version: "2.5"
gemsets: "test sidekiq"
- with:
ruby-version: "2.6"
gemsets: "test sidekiq"
- with:
ruby-version: "3.0"
gemsets: "test sidekiq"
- with:
ruby-version: "3.1"
gemsets: "test sidekiq"
timeout_in_minutes: 30
plugins:
docker-compose#v3.1.0:
run: ruby-unit-tests
use-aliases: true
env:
RUBY_TEST_VERSION: "{{ matrix.ruby-version }}"
BUNDLE_VERSION: "{{ matrix.bundle-version }}"
GEMSETS: "{{ matrix.gemsets }}"
concurrency: 4
concurrency_group: "ruby/unit-tests" |
I don't believe so. I've tried a couple of different layouts trying to get the most efficient combination. My understanding is this: If we had the below matrix matrix:
setup:
version:
- '2.2'
- '2.3'
gemsets:
- 'test sidekiq'
bundle_version:
- '1.12.0'
adjustments:
- with:
version: '2.2'
gemsets: ''
bundle_version: '1.12.0' It would end up running 3 tests in total. One with The second with `version: 2.3, gemsets: test sidekiq, bundle_version: 1.12.0' And the third one would be We could add the variations that we'd want and then skip the ones that we know would fail, but we'd then end up with more duplication. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just some small changes, then this looks fine (other than how half-baked the feature is
Can you squash merge this so we don't keep the intermediate commits?
.buildkite/pipeline.yml
Outdated
- label: ':rails: Rails 4 Ruby 2.3 tests' | ||
timeout_in_minutes: 30 | ||
plugins: | ||
docker-compose#v3.1.0: | ||
run: ruby-maze-runner | ||
use-aliases: true | ||
command: ["features/rails_features/", "--tags", "@rails3 and not @wip"] | ||
command: ["features/rails_features/", "--tags", "@rails4 and not @wip"] | ||
env: | ||
RUBY_TEST_VERSION: "2.4" | ||
RAILS_VERSION: "3" | ||
RUBY_TEST_VERSION: "2.3" | ||
RAILS_VERSION: "4" | ||
concurrency: 8 | ||
concurrency_group: 'ruby/slow-maze-runner-tests' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a duplicate of the step above
Co-authored-by: Joe Haines <hello@joehaines.co.uk>
Co-authored-by: Joe Haines <hello@joehaines.co.uk>
Co-authored-by: Joe Haines <hello@joehaines.co.uk>
Co-authored-by: Joe Haines <hello@joehaines.co.uk>
Co-authored-by: Joe Haines <hello@joehaines.co.uk>
Goal
Reduce the noise in
.buildkite/pipeline.yml
by usingmatrix
on steps where possible.Design
Implement
matrix
on steps that share common setups and do not rely onTesting
Full CI has been run