Skip to content

Commit

Permalink
Inserindo integração entre Travis e CodeClimate v3
Browse files Browse the repository at this point in the history
  • Loading branch information
leogiraldimg committed Dec 5, 2019
1 parent 194933b commit 1373caf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@ before_install:
- psql -c 'CREATE USER railsuser SUPERUSER INHERIT CREATEDB CREATEROLE' -U postgres
- psql -c "alter user railsuser with password 'Rails@123'" -U postgres
- sudo apt-get install imagemagick

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:
- rails db:migrate
Expand All @@ -30,7 +33,4 @@ services:
- postgresql

after_script:
- ./cc-test-reporter format-coverage -t simplecov -o coverage/codeclimate.backend.json coverage/backend/.resultset.json # Format backend coverage
- ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.frontend.json coverage/frontend/lcov.info # Format frontend coverage
- ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 2 # Sum both coverage parts into coverage/codeclimate.json
- if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi # Upload coverage/codeclimate.json
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

0 comments on commit 1373caf

Please sign in to comment.