-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
42 lines (35 loc) · 1.1 KB
/
.travis.yml
File metadata and controls
42 lines (35 loc) · 1.1 KB
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
---
bundler_args: --without development production staging
language: ruby
rvm:
- 1.9.2
- 1.9.3
- 2.0.0
branches:
only:
- master
- heroku
- rails3
before_script:
- if [[ "$DB" == "mysql" ]]; then mysql -e "CREATE DATABASE IF NOT EXISTS api_bootstraper_test;" -uroot; fi
- if [[ "$DB" == "pgsql" ]]; then psql -c "DROP DATABASE IF EXISTS api_bootstraper_test;" -U postgres; fi
- if [[ "$DB" == "pgsql" ]]; then psql -c 'CREATE DATABASE api_bootstraper_test' -U postgres; fi
script:
- RAILS_ENV=test bundle exec rake db:migrate --trace
- bundle exec rake db:test:prepare
- bundle exec rspec spec/ --color
after_success:
- git checkout heroku
- gem install heroku
- yes | ruby travis_deployer.rb
- yes | heroku keys:add
- git push heroku heroku:master
- heroku run rake db:migrate --app nameless-forest-4117
- heroku keys:remove travis@
env:
- global:
secure: ! 'JCcVcumANATuilKdZlqvsQk5i/cmk9Qm+1oGz4alL0rdF+lrABdx3lqXyvcQ
Pvz9VOg81o/L1nOO4b4wGoqeiKa3Ki29xpSpVdGxPntjjZPmNKgb3UQvU5Ph
Ap/mr/9h1UN3RlYd6t8Edh45BIkh+wqlBk0LsVfl9pLNKCHeOF8='
- DB=mysql
- DB=postgresql