Created
July 1, 2012 01:26
-
-
Save laserlemon/3026399 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| I'm writing a gem as an extension of multiple ORMs. I'd like to test the gem against 4 rubies, 4 ORMs and a few minor versions of each ORM. I have the 4 rubies specified in .travis.yml. I also have 13 gemfiles checked into the repo. That's 52 builds total. Each run should test only a specific version of a specific ORM using a specific Ruby. | |
| To test a specific ORM, I need to set an "ADAPTER" ENV variable. | |
| To test a specific version, I need to bundle using a different gemfile. | |
| Solution #1 | |
| ----------- | |
| I could set the "rvm" rubies, set the "env" array for the 4 ORMs, and set the "gemfile" array to the 13 gemfiles. But that's going to run 208 builds. Plus many of them would be against ActiveRecord using a MongoMapper gemfile. Doesn't work. | |
| Solution #2 | |
| ----------- | |
| I could set the "rvm" rubies, and set the "env" array with two variables to each line: | |
| ADAPTER=active_record BUNDLE_GEMFILE=gemfiles/active_record/3-0.gemfile | |
| There would be 13 envs, one for each gemfile, specifying the adapter. Those are the proper 52 builds. | |
| The problem here is that the "BUNDLE_GEMFILE" env variable is set before the build and then overridden by Travis' own build process. | |
| I hope that all makes sense! Any ideas on how to pull this off? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would go with Solution #1 plus (many)
excludedirectives, as we do with RailsAdmin.