Add option to disable coverage drivers

This commit is contained in:
Shivam Mathur
2019-10-05 15:00:00 +05:30
parent f866c880c2
commit 754ab9515b
7 changed files with 98 additions and 14 deletions

View File

@ -48,17 +48,23 @@ Setup PHP with required extensions, php.ini configuration and composer in [GitHu
- Extensions which cannot be installed gracefully leave an error message in the logs, the action is not interrupted.
## :signal_strength: Coverage support
- Specify `coverage: xdebug` to use `Xdebug`.
- Runs on all [PHP versions supported](#tada-php-support)
### Xdebug
Specify `coverage: xdebug` to use `Xdebug`.
Runs on all [PHP versions supported](#tada-php-support)
```
uses: shivammathur/setup-php@master
with:
php-version: 7.3
coverage: xdebug
```
- Specify `coverage: pcov` to use `PCOV`. `PCOV` is way faster than `Xdebug`
- For `pcov.directory` to be other than `src`, `lib` or, `app`, specify it using the `ini-values-csv` input.
- `PCOV` needs `PHPUnit >= 8.0` and `PHP >= 7.1`, `PHPUnit` needs `PHP >= 7.2`. So use `PHP >= 7.2` with `PCOV`
### PCOV
Specify `coverage: pcov` to use `PCOV`. `PCOV` is way faster than `Xdebug`.
For `pcov.directory` to be other than `src`, `lib` or, `app`, specify it using the `ini-values-csv` input.
`PCOV` needs `PHPUnit >= 8.0` and `PHP >= 7.1`, `PHPUnit` needs `PHP >= 7.2`. So use `PHP >= 7.2` with `PCOV`
```
uses: shivammathur/setup-php@master
with:
@ -67,6 +73,15 @@ with:
coverage: pcov
```
### Disable coverage
Specify `coverage: none` to disable both `Xdebug` and `PCOV`.
```
uses: shivammathur/setup-php@master
with:
php-version: 7.3
coverage: none
```
## :memo: Usage
Inputs supported by this GitHub Action.