зеркало из https://github.com/nextcloud/forms.git
Fix codecov
Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
This commit is contained in:
Родитель
47d1bb91fc
Коммит
047bee0a81
|
@ -49,6 +49,7 @@ jobs:
|
|||
php-version: ${{ matrix.php-versions }}
|
||||
tools: phpunit
|
||||
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
|
||||
coverage: xdebug
|
||||
|
||||
- name: Set up PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
|
@ -65,17 +66,19 @@ jobs:
|
|||
|
||||
- name: PHPUnit & coverage
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: ./vendor/phpunit/phpunit/phpunit --coverage-clover coverage.xml -c phpunit.xml
|
||||
run: composer test:unit
|
||||
|
||||
- name: PHPUnit integration
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: ./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml
|
||||
run: composer test:integration
|
||||
|
||||
- name: Upload coverage
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
run: bash <(curl -s https://codecov.io/bash)
|
||||
uses: codecov/codecov-action@v1
|
||||
with:
|
||||
root_dir: apps/${{ env.APP_NAME }}
|
||||
files: apps/${{ env.APP_NAME }}/tests/clover.unit.xml
|
||||
fail_ci_if_error: true
|
||||
flags: unittests
|
||||
|
||||
mysql:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -141,11 +144,11 @@ jobs:
|
|||
|
||||
- name: PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: ./vendor/phpunit/phpunit/phpunit -c phpunit.xml
|
||||
run: composer test:unit
|
||||
|
||||
- name: PHPUnit integration
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: ./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml
|
||||
run: composer test:integration
|
||||
|
||||
pgsql:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -213,11 +216,11 @@ jobs:
|
|||
|
||||
- name: PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: ./vendor/phpunit/phpunit/phpunit -c phpunit.xml
|
||||
run: composer test:unit
|
||||
|
||||
- name: PHPUnit integration
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: ./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml
|
||||
run: composer test:integration
|
||||
|
||||
oci:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -278,8 +281,8 @@ jobs:
|
|||
|
||||
- name: PHPUnit
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: ./vendor/phpunit/phpunit/phpunit -c phpunit.xml
|
||||
run: composer test:unit
|
||||
|
||||
- name: PHPUnit integration
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
run: ./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml
|
||||
run: composer test:integration
|
||||
|
|
|
@ -30,5 +30,6 @@ v8-compile-cache-0/
|
|||
# php-cs cache
|
||||
.php_cs.cache
|
||||
|
||||
# phpunit cache
|
||||
# phpunit results
|
||||
.phpunit.result.cache
|
||||
clover.unit.xml
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
comment:
|
||||
require_changes: true
|
||||
layout: "diff"
|
|
@ -11,7 +11,8 @@
|
|||
"cs:fix": "php-cs-fixer fix",
|
||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
|
||||
"phpunit": "phpunit"
|
||||
"test:unit": "phpunit -c tests/phpunit.unit.xml",
|
||||
"test:integration": "phpunit -c tests/phpunit.integration.xml"
|
||||
},
|
||||
"require-dev": {
|
||||
"christophwurst/nextcloud": "^20.0",
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<phpunit bootstrap="tests/bootstrap.php" colors="true">
|
||||
<testsuites>
|
||||
<testsuite name="integration">
|
||||
<directory>./tests/Integration</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
12
phpunit.xml
12
phpunit.xml
|
@ -1,12 +0,0 @@
|
|||
<phpunit bootstrap="tests/bootstrap.php" colors="true">
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">lib</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<testsuites>
|
||||
<testsuite name="unit">
|
||||
<directory>./tests/Unit</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
|
@ -0,0 +1,7 @@
|
|||
<phpunit bootstrap="./bootstrap.php" colors="true">
|
||||
<testsuites>
|
||||
<testsuite name="integration">
|
||||
<directory>./Integration</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<phpunit bootstrap="./bootstrap.php"
|
||||
verbose="true"
|
||||
colors="true"
|
||||
timeoutForSmallTests="900"
|
||||
timeoutForMediumTests="900"
|
||||
timeoutForLargeTests="900">
|
||||
<testsuite name='Forms app tests'>
|
||||
<directory>./Unit</directory>
|
||||
</testsuite>
|
||||
<!-- filters for code coverage -->
|
||||
<filter>
|
||||
<whitelist>
|
||||
<directory suffix=".php">../lib</directory>
|
||||
</whitelist>
|
||||
</filter>
|
||||
<logging>
|
||||
<!-- and this is where your report will be written -->
|
||||
<log type="coverage-clover" target="./clover.unit.xml"/>
|
||||
</logging>
|
||||
</phpunit>
|
Загрузка…
Ссылка в новой задаче