Merge branch 'master' into codecov-travis-tweaks

This commit is contained in:
CactusPuppy 2021-03-04 22:46:37 -08:00
commit 2f0bf822c4
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
9 changed files with 70 additions and 23 deletions

34
bin/travis_script.sh Executable file
View file

@ -0,0 +1,34 @@
#!/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
;;&
models|all)
bundle exec rspec --format documentation spec/models
;;&
features|all)
bundle exec rspec --format documentation spec/features
;;&
controllers|all)
bundle exec rspec --format documentation spec/controllers
;;&
ability|all)
bundle exec rspec --format documentation spec/ability
;;&
rest|all)
bundle exec rspec --format documentation --exclude-pattern "spec/{models,features,controllers,ability}/**/*_spec.rb"
;;
esac