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
Fix: CI. #81
Fix: CI. #81
Conversation
78f926f
to
73c6b4b
Compare
@rmm5t all yours |
.github/workflows/ci.yml
Outdated
bundle _${{ matrix.entry.bundler }}_ install | ||
- name: Bundle install with default bundler | ||
if: ${{ !matrix.entry.bundler }} | ||
run: bundle install |
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.
[CONFUSED] ruby/setup-ruby
supports a bundler
option.
For example:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: ${{ matrix.bundler }}
Why the extra work here to specify the bundler version? Also, for older ruby versions, just specify bundler 1.
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.
I cannot get the older rubies + rails to work with anything other than bundler 2.0.0.pre.3. So I chose the version recommended. That said, I think I can do bundler: 2.0.0.pre.3
, I didn't realize that was a setting.'
Update: ruby-setup doesn't support 2.0.0.pre.3 format, but this works with the latest 1.x. ruby/setup-ruby#439
.github/workflows/ci.yml
Outdated
- { ruby: "2.7", mongodb: '4.4', gemfile: 'mongoid-5.0', bundler: '2.0.0.pre.3' } | ||
- { ruby: "2.7", mongodb: '4.4', gemfile: 'mongoid-6.0' } | ||
- { ruby: "2.7", mongodb: '4.4', gemfile: 'mongoid-7.0' } | ||
- { ruby: "3.1", mongodb: '4.4', gemfile: 'mongoid-8.0' } |
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.
[CONFUSED] I don't understand this refactor of the matrix. I'd rather see a traditional build matrix and possible include
or exclude
keys for edge cases.
i.e. This entry
array doesn't make sense to me. What am I misunderstanding?
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.
I find this a lot cleaner and more declarative because we benefit little from a matrix.
- This is a 6x4 matrix and we should also be testing multiple MongoDB versions, so this will be 6x4x3 = 72 builds where about 75% are completely redundant. Even here, I started with a regular matrix and ended up with a long list of excludes, this avoids doing that.
- For these older Rubies we need a different version of bundler (2.0.0.pre.3). This is yet another parameter then, matrix explodes.
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.
My goal is get this back to green since dc5118f was merged without CI. Happy to accommodate whatever structure you prefer, lmk.
.github/workflows/ci.yml
Outdated
- { ruby: "2.7", mongodb: '4.4', gemfile: 'mongoid-5.0', bundler: '2.0.0.pre.3' } | ||
- { ruby: "2.7", mongodb: '4.4', gemfile: 'mongoid-6.0' } | ||
- { ruby: "2.7", mongodb: '4.4', gemfile: 'mongoid-7.0' } | ||
- { ruby: "3.1", mongodb: '4.4', gemfile: 'mongoid-8.0' } |
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.
I find this a lot cleaner and more declarative because we benefit little from a matrix.
- This is a 6x4 matrix and we should also be testing multiple MongoDB versions, so this will be 6x4x3 = 72 builds where about 75% are completely redundant. Even here, I started with a regular matrix and ended up with a long list of excludes, this avoids doing that.
- For these older Rubies we need a different version of bundler (2.0.0.pre.3). This is yet another parameter then, matrix explodes.
.github/workflows/ci.yml
Outdated
bundle _${{ matrix.entry.bundler }}_ install | ||
- name: Bundle install with default bundler | ||
if: ${{ !matrix.entry.bundler }} | ||
run: bundle install |
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.
I cannot get the older rubies + rails to work with anything other than bundler 2.0.0.pre.3. So I chose the version recommended. That said, I think I can do bundler: 2.0.0.pre.3
, I didn't realize that was a setting.'
Update: ruby-setup doesn't support 2.0.0.pre.3 format, but this works with the latest 1.x. ruby/setup-ruby#439
5d226f9
to
3786f4d
Compare
Thanks for this. Sorry for the delay on the merge. |
A bit of matrix work post dc5118f to make it all work, and re-added Danger.
Dropped support for Mongoid 3, couldn't make it work.
Closes #78