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.3.3
|
||||||
- 2.2.5
|
- 2.2.5
|
||||||
- 2.1
|
- 2.1
|
||||||
|
gemfile:
|
||||||
|
- Gemfile
|
||||||
|
- test/gemfiles/rails4.Gemfile
|
||||||
|
- test/gemfiles/no-rails.Gemfile
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
exclude:
|
||||||
|
- rvm: 2.1
|
||||||
|
gemfile: Gemfile
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
cache:
|
cache:
|
||||||
|
|
@ -15,7 +24,7 @@ branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
- 'develop'
|
- 'develop'
|
||||||
|
|
||||||
before_install: test/scripts/prepare-travis.sh
|
before_install: gem install bundler
|
||||||
bundler_args: "--deployment --without development --jobs=3 --retry=3"
|
bundler_args: "--deployment --without development --jobs=3 --retry=3"
|
||||||
|
|
||||||
script: test/scripts/travis.sh
|
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
|
set -x
|
||||||
|
|
||||||
if [[ ${TRAVIS_RUBY_VERSION} == "2.1" ]]; then
|
if [[ ${BUNDLE_GEMFILE} =~ .*test/gemfiles/.*.Gemfile ]]; then
|
||||||
# ruby 2.1
|
# No coverage for other gemfiles, because some specs are disabled
|
||||||
export NO_COVERAGE="true" # No coverage for rails 4, because controller specs are disabled
|
export NO_COVERAGE="true"
|
||||||
bundle exec rake --trace
|
bundle exec rake --trace
|
||||||
else
|
else
|
||||||
# ruby >= 2.2
|
|
||||||
bundle exec rake --trace
|
bundle exec rake --trace
|
||||||
test_exit_code=$?
|
test_exit_code=$?
|
||||||
bundle exec codeclimate-test-reporter
|
bundle exec codeclimate-test-reporter
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue