-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (46 loc) · 1.69 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
50
51
52
53
54
sudo: false
language: ruby
rvm:
- 2.4.4
branches:
only:
- master
addons:
postgresql: "9.6"
bundler_args:
--without development production --jobs=2
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- RACK_ENV=test
- CC_TEST_REPORTER_ID=c5094af0ca0743213e8476bda588e38ff6e51ef3e6cd993b3588bce3c3146f3a
- RUBY_GC_MALLOC_LIMIT=90000000
cache: bundler
before_script:
- psql -c 'CREATE DATABASE fibro_test;' -U postgres
- psql -c "CREATE USER fibro WITH PASSWORD 'health';" -U postgres
- "gem update --system"
- 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
before_install:
- gem update bundler # ensure bundler up to date
- "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" # ensure bundle does not install docs
script:
- bundle exec rake --version
- RACK_ENV=test bundle exec rake db:migrate
- RACK_ENV=test bundle exec rake spec
- bundle exec rake bundle:audit
- bundle exec rubocop
- bundle exec ruby-audit check
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.backend.json coverage/backend/.resultset.json # Format backend coverage
- ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 1 # Sum coverage parts into coverage/codeclimate.json (we have no front-end coverage)
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi # Upload coverage/codeclimate.json
notifications:
email:
recipients:
- stevenbeales@gmail.com
on_success: never
on_failure: change