Merge pull request #1533 from mdeniz/split_travis_builds
Split in 2 jobs Travis builds
This commit is contained in:
commit
415eadf477
4 changed files with 47 additions and 8 deletions
|
|
@ -24,6 +24,9 @@ before_script:
|
||||||
- mysql -u root -e 'create database osem_test;'
|
- mysql -u root -e 'create database osem_test;'
|
||||||
- RAILS_ENV=test bundle exec rake db:migrate --trace
|
- RAILS_ENV=test bundle exec rake db:migrate --trace
|
||||||
script:
|
script:
|
||||||
- 'bundle exec rubocop -Dc .rubocop.yml'
|
- "./travis_script.sh $TEST_SUITE"
|
||||||
- 'bundle exec haml-lint app/views'
|
env:
|
||||||
- 'bundle exec rspec --color --format documentation'
|
- TEST_SUITE=rspec
|
||||||
|
- TEST_SUITE=linters
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
|
|
||||||
1
Gemfile
1
Gemfile
|
|
@ -128,6 +128,7 @@ gem 'country_select'
|
||||||
gem 'prawn_rails'
|
gem 'prawn_rails'
|
||||||
|
|
||||||
# to render XLS spreadsheets
|
# to render XLS spreadsheets
|
||||||
|
gem 'axlsx', git: 'https://github.com/randym/axlsx.git'
|
||||||
gem 'axlsx_rails'
|
gem 'axlsx_rails'
|
||||||
|
|
||||||
# as error catcher
|
# as error catcher
|
||||||
|
|
|
||||||
16
Gemfile.lock
16
Gemfile.lock
|
|
@ -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
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
remote: https://rails-assets.org/
|
remote: https://rails-assets.org/
|
||||||
|
|
@ -65,10 +75,6 @@ GEM
|
||||||
awesome_nested_set (3.0.0.rc.5)
|
awesome_nested_set (3.0.0.rc.5)
|
||||||
activerecord (>= 4.0.0, < 5)
|
activerecord (>= 4.0.0, < 5)
|
||||||
aws_cf_signer (0.1.3)
|
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_rails (0.2.0)
|
||||||
axlsx (>= 2.0.1)
|
axlsx (>= 2.0.1)
|
||||||
rails (>= 3.1)
|
rails (>= 3.1)
|
||||||
|
|
@ -262,6 +268,7 @@ GEM
|
||||||
mime-types (>= 1.16, < 3)
|
mime-types (>= 1.16, < 3)
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mime-types (2.99.1)
|
mime-types (2.99.1)
|
||||||
|
mimemagic (0.3.2)
|
||||||
mina (0.3.8)
|
mina (0.3.8)
|
||||||
open4 (~> 1.3.4)
|
open4 (~> 1.3.4)
|
||||||
rake
|
rake
|
||||||
|
|
@ -551,6 +558,7 @@ DEPENDENCIES
|
||||||
ahoy_matey
|
ahoy_matey
|
||||||
autoprefixer-rails
|
autoprefixer-rails
|
||||||
awesome_nested_set (~> 3.0.0.rc.5)
|
awesome_nested_set (~> 3.0.0.rc.5)
|
||||||
|
axlsx!
|
||||||
axlsx_rails
|
axlsx_rails
|
||||||
bootstrap-sass (~> 3.3.4.1)
|
bootstrap-sass (~> 3.3.4.1)
|
||||||
bootstrap-switch-rails (~> 3.0.0)
|
bootstrap-switch-rails (~> 3.0.0)
|
||||||
|
|
|
||||||
27
travis_script.sh
Executable file
27
travis_script.sh
Executable 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue