Update .travis.yml to build all gemfiles

This commit is contained in:
Benjamin Neff 2017-04-05 02:24:09 +02:00
parent bb3a4e0b2a
commit 9daf1d495e
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
3 changed files with 13 additions and 17 deletions

View file

@ -5,6 +5,15 @@ rvm:
- 2.3.3
- 2.2.5
- 2.1
gemfile:
- Gemfile
- test/gemfiles/rails4.Gemfile
- test/gemfiles/no-rails.Gemfile
matrix:
exclude:
- rvm: 2.1
gemfile: Gemfile
sudo: false
cache:
@ -15,7 +24,7 @@ branches:
- 'master'
- 'develop'
before_install: test/scripts/prepare-travis.sh
before_install: gem install bundler
bundler_args: "--deployment --without development --jobs=3 --retry=3"
script: test/scripts/travis.sh

View file

@ -1,12 +0,0 @@
#!/usr/bin/env bash
set -x
gem install bundler
if [[ ${TRAVIS_RUBY_VERSION} == "2.1" ]]; then
# use rails 4 for ruby 2.1, because rails 5 needs ruby >= 2.2.2
echo "gem 'rails', '4.2.7.1'" >> Gemfile
bundle install --without development --jobs=3 --retry=3
bundle update rails
fi

View file

@ -2,12 +2,11 @@
set -x
if [[ ${TRAVIS_RUBY_VERSION} == "2.1" ]]; then
# ruby 2.1
export NO_COVERAGE="true" # No coverage for rails 4, because controller specs are disabled
if [[ ${BUNDLE_GEMFILE} =~ .*test/gemfiles/.*.Gemfile ]]; then
# No coverage for other gemfiles, because some specs are disabled
export NO_COVERAGE="true"
bundle exec rake --trace
else
# ruby >= 2.2
bundle exec rake --trace
test_exit_code=$?
bundle exec codeclimate-test-reporter