Skip to content

Commit

Permalink
Attempt to send coverage report to codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
jtsternberg committed May 21, 2018
1 parent 4bc8e98 commit d01f879
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ dist: trusty
matrix:
include:
- php: nightly
env: WP_VERSION=latest
env:
global:
- WP_VERSION=latest
- CC_TEST_REPORTER_ID=7200f3ac9aab067d6a3c75ddf45f1cadbfb0ee1f9ef902f4e2d005a2511c5745
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
- php: 7.1
env: WP_VERSION=latest
env:
global:
- WP_VERSION=latest
- CC_TEST_REPORTER_ID=7200f3ac9aab067d6a3c75ddf45f1cadbfb0ee1f9ef902f4e2d005a2511c5745
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
- php: 5.6
env: WP_VERSION=latest
- php: 5.6
Expand Down Expand Up @@ -56,6 +64,12 @@ script: if [[ latest == $WP_VERSION ]]; then phpunit --coverage-clover=coverage.
after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
if [[ ! -z "$CC_TEST_REPORTER_ID" ]] ; then
./cc-test-reporter after-build -t clover --exit-code $TRAVIS_TEST_RESULT;
fi
fi
branches:
only:
Expand Down

0 comments on commit d01f879

Please sign in to comment.