0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

try and get php-coveralls working

This commit is contained in:
David Goodwin 2021-06-11 21:55:02 +01:00
parent 31747fca89
commit 48d4435b84
3 changed files with 35 additions and 5 deletions

View File

@ -33,11 +33,40 @@ jobs:
- name: Build/test
run: composer build
- name: setup coveralls
run: mkdir -p build/logs || true
- name: build coveralls coverage
run: php -m xdebug.mode=coverage vendor/bin/phpunit tests
- name: Coveralls
run: vendor/bin/coveralls ./clover.xml || true
run: vendor/bin/php-coveralls ./clover.xml || true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
post_build:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
tools: composer
- name: setup templates_c
run: mkdir templates_c || true
- name: touch config.local.php
run: touch config.local.php && php -v
- name: Install dependencies
run: composer install --prefer-dist -n
- name: build coveralls coverage
run: php -m xdebug.mode=coverage vendor/bin/phpunit tests
- name: Coveralls
run: vendor/bin/php-coveralls ./clover.xml || true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

View File

@ -13,7 +13,7 @@
],
"check-format": "@php vendor/bin/php-cs-fixer fix --ansi --dry-run --diff",
"format": "@php vendor/bin/php-cs-fixer fix --ansi",
"lint": "@php ./vendor/bin/parallel-lint --exclude vendor/ --exclude lib/block_random_int.php --exclude lib/array_column.php .",
"lint": "@php ./vendor/bin/parallel-lint --exclude vendor/ .",
"test": "@php ./vendor/bin/phpunit --coverage-clover ./clover.xml tests/",
"test-fixup": "mkdir -p templates_c ; test -f config.local.php || touch config.local.php",
"psalm": "@php ./vendor/bin/psalm --no-cache --show-info=false "
@ -27,7 +27,7 @@
"friendsofphp/php-cs-fixer": "^2.19",
"php-parallel-lint/php-parallel-lint": "^1.0",
"php": ">7.2.0",
"cedx/coveralls": "^11.0",
"php-coveralls/php-coveralls": "*",
"phpunit/phpunit": "8.*",
"vimeo/psalm":"^4.0",
"shardj/zf1-future" : "^1.12"

View File

@ -12,6 +12,7 @@
</php>
<logging>
<log type="coverage-clover" target="clover.xml"/>
<log type="coverage-html" target="./coverage" lowUpperBound="35" highLowerBound="70"/>
</logging>