Skip to content

Commit

Permalink
Push code coverage to codeclimate
Browse files Browse the repository at this point in the history
  • Loading branch information
jpina committed Feb 14, 2016
1 parent d0f6896 commit e4042bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ script:
- if [[ "$EXECUTE_CS_CHECK" = 'true' ]]; then vendor/bin/phpcs --standard=psr2 src/ ; fi

after_script:
- if [[ "$EXECUTE_TEST_COVERAGE" = "true" ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml; fi
- if [[ "$EXECUTE_TEST_COVERAGE" = "true" ]]; then php vendor/bin/ocular code-coverage:upload --format=php-clover build/logs/clover.xml ; fi
- if [[ "$EXECUTE_TEST_COVERAGE" = "true" ]]; then php bin/codeclimate.sh ; fi

notifications:
on_success: never
Expand Down
4 changes: 4 additions & 0 deletions bin/codeclimate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

$(dirname $0)/../vendor/bin/test-reporter --stdout > codeclimate.json
curl -X POST -d @codeclimate.json -H 'Content-Type: application/json' -H 'User-Agent: Code Climate (PHP Test Reporter v0.2.0)' https://codeclimate.com/test_reports

0 comments on commit e4042bc

Please sign in to comment.