hpi-swt2/sport-portal

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
# If the ruby version is not specified by the rvm key, Travis CI uses the version
# specified in the .ruby-version file in the root of the repository if one is available.
language: ruby
# Cache gems for faster builds
# https://docs.travis-ci.com/user/caching/#Bundler
cache: bundler
# No need to install gems that are not needed for testing
# https://docs.travis-ci.com/user/languages/ruby/#Speeding-up-your-build-by-excluding-non-essential-dependencies
bundler_args: --without development
# Use PostgreSQL db for test on Travis
# https://docs.travis-ci.com/user/database-setup/#PostgreSQL
services:
  - postgresql
# Setup PostgreSQL db
# https://docs.travis-ci.com/user/database-setup/#Using-PostgreSQL-in-your-Builds
before_script:
  - cp config/database.travis.yml config/database.yml
  - psql -c 'create database travis_ci_test;' -U postgres
  - bundle exec rake db:create db:migrate RAILS_ENV=test
# Commands to start test execution, default is `rake`
# https://docs.travis-ci.com/user/languages/ruby/#Default-Build-Script
# Use the 'xvfb' tool to run tests that require a GUI
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
script:
  - bundle exec rspec
  - bundle exec cucumber