mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Split in 2 jobs Travis build
This commit is contained in:
parent
7a7fcced48
commit
5acb4a9339
2 changed files with 33 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
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