Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

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 21, 2016
1 parent 96234ce commit 0fec125
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: php
php:
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
Expand All @@ -12,7 +12,7 @@ matrix:
- php: hhvm

script:
- vendor/bin/tester tests -s -p php
- vendor/bin/tester tests -s -p php $coverage
- php code-checker/src/code-checker.php -d src

after_failure:
Expand All @@ -23,6 +23,15 @@ before_script:
# Install Nette Tester & Code Checker
- travis_retry composer install --no-interaction --prefer-dist
- travis_retry composer create-project nette/code-checker code-checker ~2.5 --no-interaction
- if [ $TRAVIS_PHP_VERSION == "7.0" ]; then coverage="-p phpdbg --coverage ./coverage.xml --coverage-src ./src"; fi

after_script:
# Report Code Coverage
- >
if [ "$coverage" != "" ]; 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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"php": ">=5.3.1"
},
"require-dev": {
"nette/tester": "~1.0",
"nette/tester": "~1.7",
"tracy/tracy": "^2.3"
},
"conflict": {
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 Tokenizer

[![Downloads this Month](https://img.shields.io/packagist/dm/nette/tokenizer.svg)](https://packagist.org/packages/nette/tokenizer)
[![Build Status](https://travis-ci.org/nette/tokenizer.svg?branch=master)](https://travis-ci.org/nette/tokenizer)
[![Coverage Status](https://coveralls.io/repos/github/nette/tokenizer/badge.svg?branch=master)](https://coveralls.io/github/nette/tokenizer?branch=master)
[![Latest Stable Version](https://poser.pugx.org/nette/tokenizer/v/stable)](https://github.com/nette/tokenizer/releases)
[![License](https://img.shields.io/badge/license-New%20BSD-blue.svg)](https://github.com/nette/tokenizer/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 0fec125

Please sign in to comment.