Update .travis.yml to build all gemfiles
This commit is contained in:
parent
bb3a4e0b2a
commit
9daf1d495e
3 changed files with 13 additions and 17 deletions
11
.travis.yml
11
.travis.yml
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue