Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (34 sloc) 914 Bytes
addons:
apt:
packages:
- libmagic-dev
language: ruby
sudo: false
cache: bundler
services:
- mysql
- redis
rvm:
- 2.2.7
- 2.3.4
- 2.4.1
env:
- SUGAR_DB=sqlite
- SUGAR_DB=mysql SUGAR_DB_USERNAME=travis
- SUGAR_DB=postgresql
matrix:
exclude:
- rvm: 2.2.7
env: SUGAR_DB=sqlite
- rvm: 2.2.7
env: SUGAR_DB=postgresql
script:
- bundle exec rspec spec
before_script:
- sh -c "if [ '$SUGAR_DB' = 'mysql' ]; then mysql -e 'create database sugar_test;'; fi"
- sh -c "if [ '$SUGAR_DB' = 'postgresql' ]; then psql -c 'create database sugar_test' -U postgres; fi"
- sh -c "if [ '$SUGAR_DB' = 'sqlite' ]; then bundle exec rake db:create; fi"
- bundle exec rake db:migrate
- bundle exec rake sunspot:solr:start RAILS_ENV=test
after_script:
- CODECLIMATE_REPO_TOKEN=486bb0a91d51ad96ec90a47dced78f74bfe54ae9b913ac83fa48d69703e3f66d bundle exec codeclimate-test-reporter