Skip to content
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

Start testing against Ruby 3.2 #1214

Merged
merged 2 commits into from
Oct 6, 2022
Merged

Start testing against Ruby 3.2 #1214

merged 2 commits into from
Oct 6, 2022

Conversation

paracycle
Copy link
Member

Motivation

We should make sure Tapioca works well against upcoming Ruby 3.2 version

Implementation

I simplified the way we declare experimental builds and added ruby: "3.2" target and marked it experimental.

Tests

No new tests.

Remove the default `experimental` entry in the build matrix, and instead
mark Ruby versions and/or gemfiles that are experimental as `true` in
the `include` section.

This works really well, since the default value for `experimental` is
`false`, which is basically the same as `undefined`, so it doesn't need
to be declared explicitly. I made sure that the `continue-on-error` is
properly assigned a boolean value by using the `!!` operator, to be safe.

As for the `includes` section, the documentation states that:

> the key:value pairs in the object will be added to each of the matrix
combinations if none of the key:value pairs overwrite any of the
original matrix values.

This means that if we add `experimental: true` for a specific matrix
item, then that will be added to all the matrix entries that match that
matrix item.

Using this, we can mark all matrix entries that use `Gemfile-rails-main`
gemfile as being experimental, without having to enumerate all the Ruby
versions again.
@paracycle paracycle requested a review from rafaelfranca October 6, 2022 19:30
@paracycle paracycle requested a review from a team as a code owner October 6, 2022 19:30
gemfile:
- Gemfile
- gemfiles/Gemfile-rails-6-1
- gemfiles/Gemfile-rails-main
include:
- gemfile: gemfiles/Gemfile-rails-main
Copy link
Member

@st0012 st0012 Oct 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now we add gemfiles/Gemfile-rails-main to the matrix, is this still needed?

Does it mark all gemfiles/Gemfile-rails-main as experimental?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it mark all gemfiles/Gemfile-rails-main as experimental?

Yes, exactly this. The documentation states:

For each object in the include list, the key:value pairs in the object will be added to each of the matrix combinations if none of the key:value pairs overwrite any of the original matrix values.

So adding gemfiles/Gemfile-rails-main here with experimental: true marks all those gemfile builds to be experimental, which was what we were doing before by enumerating them explicitly.

@paracycle paracycle merged commit 3db87c7 into main Oct 6, 2022
@paracycle paracycle deleted the uk-test-ruby-3-2 branch October 6, 2022 20:03
@shopify-shipit shopify-shipit bot temporarily deployed to production November 10, 2022 17:34 Inactive
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.

3 participants