Skip to content

Commit

Permalink
Coveralls Code coverage added.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiGAndromeda committed Sep 25, 2021
1 parent cefd151 commit d0b55e1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage_clover: tests/logs/clover.xml
json_path: tests/logs/coveralls-upload.json
service_name: travis-ci
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache
/phpunit.xml
/tests/cache
###< symfony/phpunit-bridge ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
.clover.xml
###< phpunit/phpunit ###
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ env:
global:
- PHPUNIT_FLAGS="-v"
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit"
- XDEBUG_MODE="coverage"

before_install:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer self-update
- composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-main
- composer global require --no-progress --no-scripts --no-plugins symfony/flex

install:
- travis_retry composer update -n --prefer-dist --prefer-stable

script:
- composer validate --strict --no-check-lock
- ./vendor/bin/phpunit -v
- vendor/bin/phpunit -v -c phpunit.xml.dist --coverage-clover tests/logs/clover.xml

after_success:
- travis_retry php vendor/bin/php-coveralls -v

jobs:
include:
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"require-dev": {
"captainhook/plugin-composer": "^5.3",
"it-bens/object-transformer-test-utilities": "*@dev",
"php-coveralls/php-coveralls": "^2.4",
"phpunit/phpunit": "^7.5|^8.5",
"roave/security-advisories": "dev-latest",
"symfony/yaml": "^4.4|^5.3"
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="./vendor/autoload.php"
Expand Down

0 comments on commit d0b55e1

Please sign in to comment.