forked from seek4science/seek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (39 loc) · 1.57 KB
/
.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
language: ruby
dist: bionic
cache: bundler
jdk:
- openjdk11
python: "3.6"
addons:
apt:
packages:
- python3-pip
- python3-setuptools
services:
- mysql
- postgresql
- xvfb
sudo: false
env:
- SUITE="rails test test/unit" DB_TYPE=mysql
- SUITE="rails test test/unit" DB_TYPE=sqlite3
- SUITE="rails test test/unit" DB_TYPE=postgres
- SUITE="rails test test/functional" DB_TYPE=mysql
- SUITE="rails test test/integration" DB_TYPE=mysql
- SUITE="rspec spec" DB_TYPE=mysql
# - SUITE="rake teaspoon" RAILS_ENV=test DB_TYPE=mysql
- SUITE="rake assets:precompile RAILS_ENV=production" DB_TYPE=mysql
- SUITE="rake db:setup RAILS_ENV=production" DB_TYPE=mysql
before_install:
- pip3 install -r requirements.txt
before_script:
- sh -c "if [ '$DB_TYPE' = 'pgsql' ]; then psql -c 'create database travis_ci_test; create database travis_ci_dev; create database travis_ci_prod;' -U postgres; fi"
- cp test/config/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 [ '$SUITE' = 'rake assets:precompile RAILS_ENV=production' ]; then RAILS_ENV=production bundle exec rake db:create; fi"
- sh -c "if [ '$SUITE' = 'rake assets:precompile RAILS_ENV=production' ]; then RAILS_ENV=production bundle exec rake db:schema:load; fi"
script: bundle exec $SUITE
notifications:
slack:
secure: fK3kbDHg/kwFCjxhFkg0wkOcwXoFwkfJJdRFwZQtnMDkY4yHNtr9SWIHWOiI9OceNgWLeHwvvm/7737WBWnTf4RF3mn0/D9xYtOn+DfV2gb1xXVjDb33oBQWrFN8P1x4xFNOMw38LQ46NYvsv6bfPmZRJpKuvHPVJUsBCINx14w=