Skip to content

Adjust TravisCI Ruby matrix #2371

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

Closed
wants to merge 4 commits into from
Closed

Adjust TravisCI Ruby matrix #2371

wants to merge 4 commits into from

Conversation

wasifhossain
Copy link
Member

@wasifhossain wasifhossain commented Jan 10, 2020

Purpose

@wasifhossain
Copy link
Member Author

slightly different status from travis. lets see if the build is allowed to run this time

image

@wasifhossain
Copy link
Member Author

no change in appveyor since last green run, though its now failing for some reason


- { rvm: *ruby_2_1, env: *rails_master }
- { rvm: *ruby_2_2, env: *rails_master }
- { rvm: *ruby_2_3, env: *rails_master }
- { rvm: *ruby_2_4, env: *rails_master }

allow_failures:
Copy link
Member

Choose a reason for hiding this comment

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

I almost never look at the allowed failures. unless you are, there's really no reason to put the load on the CI

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree with you very much. The fact is, the build matrix, how its configured, runs tests for each Ruby version listed under rvm against each of the Rails versions under jobs

rvm:
  - *ruby_2_1
  - *ruby_2_2
  - *ruby_2_3
  - *ruby_2_4
  - *ruby_2_5
  - *ruby_2_6
  - *ruby_2_7
  - *ruby_head

jobs:
  - *rails_4_1
  - *rails_4_2
  - *rails_5_0
  - *rails_5_1
  - *rails_5_2
  - *rails_6_0
  - *rails_master

In order to SKIP the CI, we list the envs (rvm/jobs) under exclude section:

exclude:
  - { rvm: *ruby_2_4,  env: *rails_4_1 }
  - { rvm: *ruby_2_5,  env: *rails_4_1 }
  - { rvm: *ruby_2_6,  env: *rails_4_1 }
  - { rvm: *ruby_2_7,  env: *rails_4_1 }
  - { rvm: *ruby_head, env: *rails_4_1 }

  - { rvm: *ruby_2_7,  env: *rails_4_2 }
  - { rvm: *ruby_head, env: *rails_4_2 }

  - { rvm: *ruby_2_1,  env: *rails_5_0 }
  - { rvm: *ruby_2_1,  env: *rails_5_1 }
  - { rvm: *ruby_2_1,  env: *rails_5_2 }

  - { rvm: *ruby_2_1,  env: *rails_6_0 }
  - { rvm: *ruby_2_2,  env: *rails_6_0 }
  - { rvm: *ruby_2_3,  env: *rails_6_0 }
  - { rvm: *ruby_2_4,  env: *rails_6_0 }

  - { rvm: *ruby_2_1,  env: *rails_master }
  - { rvm: *ruby_2_2,  env: *rails_master }
  - { rvm: *ruby_2_3,  env: *rails_master }
+ - { rvm: *ruby_2_4,  env: *rails_master }

Moreover, the envs which are not run under default configuration (e.g. jRuby) have been listed under include section.

And the envs which are from (ruby/jruby)-head or rails-master, have been listed under allow_failures, so that we can see any upcoming errors in advance due to new changes on those envs

Copy link
Member Author

Choose a reason for hiding this comment

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

here is the last successful build on Travis, where you can find all the envs that are using the CI.

https://travis-ci.org/rails-api/active_model_serializers/builds/604587180

let me know if we need to exclude any of the envs from the list

Copy link
Member

Choose a reason for hiding this comment

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

yeah, that's why I removed some from the rvm list and selectively added them to the include list

@@ -65,17 +66,19 @@ rvm:
- *ruby_2_1
- *ruby_2_2
- *ruby_2_3
- *ruby_2_4
- *ruby_2_5
- *ruby_2_6
Copy link
Member

Choose a reason for hiding this comment

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

it's fine that you want this, but we're already testing 2.7, so the pr description is out of sync with the intent

Copy link
Member Author

Choose a reason for hiding this comment

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

these lines have already been there for long. here is the last commit prior to our attempt to support ruby 2.7

https://github.com/rails-api/active_model_serializers/blob/6b093c965f75f87d5bbf0510e64b5193f4c6f157/.travis.yml#L65..L67

which got removed from #2368 by mistake

Copy link
Member Author

Choose a reason for hiding this comment

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

I have updated the OP intent. Please let me know if you think we should move some of these changes out of this

Copy link
Member

Choose a reason for hiding this comment

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

I actually removed those lines on purpose. Maybe my execution failed, inasmuch as I intend to just test a few of them, in order to reduce the matrix size to what is likely to catch a problem

Copy link
Member Author

Choose a reason for hiding this comment

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

could you please suggest the build matrix that you have in mind? we can try to configure it accordingly

@bf4 bf4 changed the title Update travis to support Ruby 2.7 along with existing versions Adjust TravisCI Ruby matrix Jan 13, 2020
@wasifhossain wasifhossain reopened this Feb 13, 2020
@wasifhossain wasifhossain reopened this Feb 18, 2020
@wasifhossain
Copy link
Member Author

good news is, travis is working again 🎉

bad news is, not sure why simplecov is failing with

RuntimeError cannot change the measuring target during coverage measurement

@wasifhossain
Copy link
Member Author

update on simplecov:

0.18.x only allows ruby >= 2.4.

latest version that supports ruby >= 2.1 is 0.17.1. it looks like putting this constraint on the gemspec should overcome the error

spec.add_development_dependency 'simplecov', '~> 0.17.1'

@wasifhossain
Copy link
Member Author

simplecov issue resolved 🎉

@wasifhossain
Copy link
Member Author

next issue with grape; looks slightly complex

the current bug is caused in grape tests due to rack >= 2.1.0. more info here: ruby-grape/grape#1980

grape 1.3.0 fixes the bug, though with the cost of requiring ruby >= 2.4 😕

@wasifhossain
Copy link
Member Author

we can use a band-aid solution to have grape tests passed, by restricting rack to <= 2.0.8

grape >= 1.3.0 has side-effects of dropping support for ruby < 2.4
@wasifhossain
Copy link
Member Author

Travis is looking green (partially) after quite some time. CRuby tests are all passed. JRuby 9.2.x are also passing, though 9.1.x failed due to already existing bundler > 2.

@wasifhossain
Copy link
Member Author

Removing bundler >= 2 didn't help either; it still remains (most probably due to rubygems)

image

@bf4
Copy link
Member

bf4 commented May 17, 2023

travis ci is dead

@bf4 bf4 closed this May 17, 2023
@bf4 bf4 deleted the ruby-2-7 branch May 17, 2023 02:39
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.

2 participants