-
Notifications
You must be signed in to change notification settings - Fork 46
/
.travis.yml
38 lines (38 loc) · 1.31 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
language: ruby
sudo: false
cache: bundler
addons:
apt:
packages:
- libhiredis-dev
postgresql: '9.5'
services:
- redis-server
rvm:
- 2.4.2
env: DB=postgres CI=1
bundler_args: --without development debug
before_script:
- cp config/database.yml.ci config/database.yml
- bundle exec rake db:setup
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > bin/cc-test-reporter
- chmod +x bin/cc-test-reporter
- bin/cc-test-reporter before-build
script: bundle exec rake
deploy:
provider: script
script: bin/deploy
on:
branch: master
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/4c51e5a596ad847fad37
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always
after_success:
- bin/cc-test-reporter format-coverage -t simplecov -o ./coverage/test-unit/codeclimate.json coverage/test-unit/.resultset.json
- bin/cc-test-reporter format-coverage -t simplecov -o ./coverage/rspec/codeclimate.json coverage/rspec/.resultset.json
- bin/cc-test-reporter sum-coverage --parts 2 coverage/test-unit/codeclimate.json coverage/rspec/codeclimate.json
- bin/cc-test-reporter upload-coverage