-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
42 lines (33 loc) · 1.26 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
addons:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
services:
- docker
env:
global:
- CC_TEST_REPORTER_ID=253a8ed9e5c44fd63c4dc58135e17087da1bbd9e80bb8a0461e54ab46af8133f
- PGPORT=5432
before_script:
- cp config/database.yml.travis config/database.yml
- cp config/application.yml.travis config/application.yml
- 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
- docker pull schickling/mailcatcher
- docker run -d -p 127.0.0.1:1025:1025 schickling/mailcatcher
- docker ps -a
dist: xenial
language: ruby
rvm:
- 3.2.2
script:
- bundle exec rails db:create RAILS_ENV=test
- bundle exec rails db:migrate RAILS_ENV=test
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter format-coverage -t simplecov -o ./coverage/codeclimate.$CI_NODE_INDEX.json ./coverage/spec/.resultset.json; fi
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter sum-coverage --output - --parts 1 coverage/codeclimate.*.json | ./cc-test-reporter upload-coverage --input -; fi