mirror of https://github.com/nextcloud/calendar
Report test coverage for PHP
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
78e4faac65
commit
6e34f162b7
|
@ -38,3 +38,10 @@ jobs:
|
|||
- name: Run tests
|
||||
working-directory: nextcloud/apps/calendar
|
||||
run: composer run test
|
||||
- name: Upload coverage to Codecov
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
file: ./nextcloud/apps/calendar/tests/php/clover.unit.xml
|
||||
flags: php
|
||||
fail_ci_if_error: true
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
"scripts": {
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;",
|
||||
"phan": "phan --allow-polyfill-parser -k .phan/config.php",
|
||||
"test": "phpunit --bootstrap tests/php/unit/bootstrap.php tests/php/unit/ --fail-on-warning"
|
||||
"test": "phpunit --configuration tests/php/phpunit.unit.xml --fail-on-warning"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<phpunit bootstrap="unit/bootstrap.php"
|
||||
verbose="true"
|
||||
timeoutForSmallTests="900"
|
||||
timeoutForMediumTests="900"
|
||||
timeoutForLargeTests="900"
|
||||
>
|
||||
<testsuite name='Calendar app tests'>
|
||||
<directory suffix='test.php'>unit</directory>
|
||||
<directory suffix='Test.php'>unit</directory>
|
||||
</testsuite>
|
||||
<!-- filters for code coverage -->
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../../</directory>
|
||||
<exclude>
|
||||
<directory suffix=".php">../calendar/appinfo</directory>
|
||||
<directory suffix=".php">../calendar/l10n</directory>
|
||||
<directory suffix=".php">../calendar/templates</directory>
|
||||
<directory suffix=".php">../calendar/tests</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<logging>
|
||||
<!-- and this is where your report will be written -->
|
||||
<log type="coverage-clover" target="./clover.unit.xml"/>
|
||||
</logging>
|
||||
</phpunit>
|
Loading…
Reference in New Issue