Skip to content

Commit

Permalink
tests/travis: reports code coverage to Coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Apr 20, 2016
1 parent 0ad1fcc commit ef8bd30
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ matrix:
env: dependencies="--prefer-lowest --prefer-stable"

script:
- vendor/bin/tester tests -s -p php -c tests/php-unix.ini
- vendor/bin/tester tests -s -p php -c tests/php-unix.ini $COVERAGE
- php temp/code-checker/src/code-checker.php --short-arrays -i netteForms
- if [ $TRAVIS_PHP_VERSION == "5.6" ]; then grunt --gruntfile=tests/netteForms/Gruntfile.js test; fi

Expand All @@ -26,6 +26,14 @@ before_script:
- travis_retry composer update --no-interaction --prefer-dist $dependencies
- travis_retry composer create-project nette/code-checker temp/code-checker ~2.5 --no-interaction
- if [ $TRAVIS_PHP_VERSION == "5.6" ]; then npm install -g grunt-cli; cd tests/netteForms; npm install; bower install; cd ../..; fi
- if [ $TRAVIS_PHP_VERSION == "7.0" ]; then COVERAGE="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi

after_script:
# Report Code Coverage
- if [ $TRAVIS_PHP_VERSION == "7.0" ]; then
wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
&& php coveralls.phar --verbose --config tests/.coveralls.yml
|| true; fi

sudo: false

Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Nette Forms: greatly facilitates web forms

[![Downloads this Month](https://img.shields.io/packagist/dm/nette/forms.svg)](https://packagist.org/packages/nette/forms)
[![Build Status](https://travis-ci.org/nette/forms.svg?branch=master)](https://travis-ci.org/nette/forms)
[![Coverage Status](https://coveralls.io/repos/github/nette/forms/badge.svg?branch=master)](https://coveralls.io/github/nette/forms?branch=master)
[![Latest Stable Version](https://poser.pugx.org/nette/forms/v/stable)](https://github.com/nette/forms/releases)
[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/forms/blob/master/license.md)

Expand Down
4 changes: 4 additions & 0 deletions tests/.coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# for php-coveralls
service_name: travis-ci
coverage_clover: coverage.xml
json_path: coverage.json

0 comments on commit ef8bd30

Please sign in to comment.