diaspora_federation/test/scripts/travis.sh
cmrd Senya d8209cf3a9 Fix CI script false positive return code
For Ruby >= 2.2 travis.sh returned 0 even when the rspec test suite
has failed. This commit passes the return value from the test suite
as the CI script return value.
2017-01-17 21:54:58 +02:00

15 lines
355 B
Bash
Executable file

#!/usr/bin/env bash
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
bundle exec rake rails4:test --trace
else
# ruby >= 2.2
bundle exec rake --trace
test_exit_code=$?
bundle exec codeclimate-test-reporter
exit $test_exit_code
fi