Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Travis CI Test Coverage Example

Public Beta

The configuration below is for our new test reporter, which is in Public Beta, and subject to breaking changes in the future.
If you prefer not to use our Public Beta, you are welcome to (continue to) use our soon to be deprecated older test reporters.

The example below is not applicable for tests run in parallel.

env:
  global:
    - CC_TEST_REPORTER_ID=787a2f89b15c637323c7340d65ec17e898ac44480706b4b4122ea040c2a88f1d
language: ruby
rvm:
  - 2.2.0
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:
  - bundle exec rspec
after_script:
  - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT

Troubleshooting

Travis CI allows users to build Pull requests in addition to push builds. If you're running Pull request builds, we suggest you run the ./cc-test-reporter commands on push builds only. To avoid running commands on a Pull request build use $TRAVIS_PULL_REQUEST. For example: if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi

Travis CI Test Coverage Example