Skip to content

Instantly share code, notes, and snippets.

@JuanitoFatas
Last active January 7, 2016 14:08
Show Gist options
  • Save JuanitoFatas/55e259d0efcfcd73dde1 to your computer and use it in GitHub Desktop.
Save JuanitoFatas/55e259d0efcfcd73dde1 to your computer and use it in GitHub Desktop.
Sample travis.yml for RubyGems.
language: ruby
bundler_args: --retry=3 --jobs=3
cache: bundler
sudo: false
rvm:
- 2.3
- 2.2
- 2.1
- 2.0
- 1.9.3
- jruby-19mode
- jruby-head
- ruby-head
env:
global:
- JRUBY_OPTS="-J-Xmx1024M --debug"
matrix:
allow_failures:
- rvm: 1.9.3
- rvm: jruby-19mode
- rvm: jruby-head
- rvm: ruby-head
fast_finish: true
@JuanitoFatas
Copy link
Author

  • cache: bundler Source, if you put gems under vendor/, read this warning 🙇
  • ⚠️ If you have any script using sudo, remove line 4. More info
  • - JRUBY_OPTS="-J-Xmx1024M --debug" from rails/rails 🌠
  • 1.9.3 allows failure because support for 1.9.3 has ended 😢
  • fast_finish: true will mark your build as "passed" as soon as all builds are passed except ones from allow_failures More info

This .travis.yml will test latest Ruby 2.0.0, 2.1, 2.2.1.

If you want to drop 1.9.3 support, add spec.required_ruby_version = '~> 2.0' in your-gem.gemspec and use this .travis.yml instead:

language: ruby
bundler_args: --retry=3 --jobs=3
cache: bundler
sudo: false
rvm:
  - 2.3
  - 2.2
  - 2.1
  - 2.0
  - jruby-head
  - ruby-head
env:
  global:
    - JRUBY_OPTS="-J-Xmx1024M --debug"
matrix:
  allow_failures:
    - rvm: jruby-head
    - rvm: ruby-head
  fast_finish: true

@hooopo
Copy link

hooopo commented Mar 9, 2015

Awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment