.travis.yml
env:
global:
- CC_TEST_REPORTER_ID=b59406eb545843eae141deb6772544cbfa135076b25779a9c28efe630312f8d9
services:
- mongodb
language: ruby
rvm:
- 2.4.5
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- DRIVER=ar DEBUG=1 bundle exec rspec
- DRIVER=mongo DEBUG=1 bundle exec rspec
after_script:
- ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.json coverage/.resultset.json
- ./cc-test-reporter sum-coverage coverage/codeclimate.json -p 1
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi