use pcov for coverage

This commit is contained in:
TomasVotruba 2020-01-19 21:43:52 +01:00
parent a74b6617bc
commit ebdd023dc4
2 changed files with 13 additions and 28 deletions

View File

@ -1,3 +0,0 @@
service_name: travis-ci
coverage_clover: coverage.xml
json_path: coverage.json

View File

@ -16,8 +16,7 @@ jobs:
name: PHP ${{ matrix.php }} tests
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
@ -31,8 +30,7 @@ jobs:
- run: git fetch --depth=100000 origin
# see https://github.com/shivammathur/setup-php
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none
@ -44,8 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
@ -56,8 +53,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
@ -68,8 +64,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none # disable xdebug, pcov
@ -91,8 +86,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
@ -103,8 +97,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
@ -115,8 +108,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
@ -127,8 +119,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
@ -139,8 +130,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.2
coverage: none # disable xdebug, pcov
@ -154,8 +144,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: none # disable xdebug, pcov
@ -166,8 +155,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v1
with:
php-version: 7.3
coverage: pcov
@ -176,7 +164,7 @@ jobs:
# https://kizu514.com/blog/pcov-is-better-than-phpdbg-and-xdebug-for-code-coverage/
- run: |
vendor/bin/phpunit --coverage-clover coverage.xml
vendor/bin/phpunit --coverage-clover build/logs/clover.xml
# Coveralls.io
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.1.0/php-coveralls.phar
php php-coveralls.phar --verbose