Merge pull request #1533 from mdeniz/split_travis_builds

Split in 2 jobs Travis builds
This commit is contained in:
Ana María Martínez Gómez 2017-06-10 02:21:06 +02:00 committed by GitHub
commit 415eadf477
4 changed files with 47 additions and 8 deletions

View file

@ -24,6 +24,9 @@ before_script:
- mysql -u root -e 'create database osem_test;'
- RAILS_ENV=test bundle exec rake db:migrate --trace
script:
- 'bundle exec rubocop -Dc .rubocop.yml'
- 'bundle exec haml-lint app/views'
- 'bundle exec rspec --color --format documentation'
- "./travis_script.sh $TEST_SUITE"
env:
- TEST_SUITE=rspec
- TEST_SUITE=linters
matrix:
fast_finish: true

View file

@ -128,6 +128,7 @@ gem 'country_select'
gem 'prawn_rails'
# to render XLS spreadsheets
gem 'axlsx', git: 'https://github.com/randym/axlsx.git'
gem 'axlsx_rails'
# as error catcher
@ -178,7 +179,7 @@ gem 'cloudinary'
# for setting app configuration in the environment
gem 'dotenv-rails'
# For countable.js
# For countable.js
gem "countable-rails", "~> 0.0.1"
# Both are not in a group as we use it also for rake data:demo

View file

@ -1,3 +1,13 @@
GIT
remote: https://github.com/randym/axlsx.git
revision: c8ac844572b25fda358cc01d2104720c4c42f450
specs:
axlsx (2.1.0.pre)
htmlentities (~> 4.3.4)
mimemagic (~> 0.3)
nokogiri (>= 1.6.6)
rubyzip (>= 1.2.1)
GEM
remote: https://rubygems.org/
remote: https://rails-assets.org/
@ -65,10 +75,6 @@ GEM
awesome_nested_set (3.0.0.rc.5)
activerecord (>= 4.0.0, < 5)
aws_cf_signer (0.1.3)
axlsx (2.0.1)
htmlentities (~> 4.3.1)
nokogiri (>= 1.4.1)
rubyzip (~> 1.2.1)
axlsx_rails (0.2.0)
axlsx (>= 2.0.1)
rails (>= 3.1)
@ -262,6 +268,7 @@ GEM
mime-types (>= 1.16, < 3)
method_source (0.8.2)
mime-types (2.99.1)
mimemagic (0.3.2)
mina (0.3.8)
open4 (~> 1.3.4)
rake
@ -551,6 +558,7 @@ DEPENDENCIES
ahoy_matey
autoprefixer-rails
awesome_nested_set (~> 3.0.0.rc.5)
axlsx!
axlsx_rails
bootstrap-sass (~> 3.3.4.1)
bootstrap-switch-rails (~> 3.0.0)

27
travis_script.sh Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
# This script runs the test suites for the CI build
# Be verbose and fail script on the first error
set -xe
# By default: all test runs
if [ -z $1 ]; then
TEST_SUITE="all"
else
TEST_SUITE="$1"
fi
case $TEST_SUITE in
linters)
bundle exec rubocop -Dc .rubocop.yml
bundle exec haml-lint app/views
;;
rspec)
bundle exec rspec --color --format documentation
;;
*)
bundle exec rubocop -Dc .rubocop.yml
bundle exec haml-lint app/views
bundle exec rspec --color --format documentation
;;
esac