forked from seek4science/seek
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
28 lines (22 loc) · 953 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
language: ruby
rvm:
- 2.1.7
sudo: false
cache: bundler
env:
- SUITE="rake test:units" DB_TYPE=mysql
- SUITE="rake test:functionals" DB_TYPE=mysql
- SUITE="rake test:integration" DB_TYPE=mysql
- SUITE="rspec spec" DB_TYPE=mysql
- SUITE="rake assets:precompile RAILS_ENV=production" DB_TYPE=mysql
- SUITE="rake teaspoon" DB_TYPE=mysql DISPLAY=":99.0"
before_script:
- sh -e /etc/init.d/xvfb start
- sleep 5 # give time for xvfb to start
- sh -c "if [ '$DB_TYPE' = 'pgsql' ]; then psql -c 'create database travis_ci_test;' -U postgres; fi"
- cp test/database.travis.$DB_TYPE.yml config/database.yml
- RAILS_ENV=test bundle exec rake db:create
- RAILS_ENV=test bundle exec rake db:schema:load
- sh -c "if [ '$DB_TYPE' = 'mysql' ]; then RAILS_ENV=production bundle exec rake db:create; fi"
- sh -c "if [ '$DB_TYPE' = 'mysql' ]; then RAILS_ENV=production bundle exec rake db:schema:load; fi"
script: bundle exec $SUITE