From 56eaede01fe95d1a6a36b2814b11ba072bcce52d Mon Sep 17 00:00:00 2001 From: Marcel Hernandez Date: Sun, 24 Sep 2023 20:12:54 +0200 Subject: [PATCH] fix Scrutinizer code coverage --- .github/workflows/ci.yml | 2 ++ .scrutinizer.yml | 23 +++++------------------ composer.json | 3 ++- 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 753967b..b53835f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,3 +12,5 @@ jobs: - run: composer install - run: php vendor/bin/php-cs-fixer fix --dry-run -v - run: composer test + - if: ${{ always() }} + run: php vendor/bin/ocular code-coverage:upload --format=php-clover build/coverage.xml diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 2c63442..2034ec0 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -3,25 +3,12 @@ filter: - 'tests/' dependency_paths: - 'vendor/' + checks: php: true + coding_style: php: { } -build: - nodes: - analysis: - project_setup: - override: true - tests: - override: - - php-scrutinizer-run --enable-security-analysis - testing: - environment: - php: '8.2' - tests: - override: - - - command: composer test - coverage: - file: build/coverage.xml - format: php-clover + +tools: + external_code_coverage: true diff --git a/composer.json b/composer.json index 3377c39..cfd056d 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,8 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.28", "phpbench/phpbench": "^1.0", - "phpunit/phpunit": "^10.3" + "phpunit/phpunit": "^10.3", + "scrutinizer/ocular": "^1.9" }, "autoload": { "psr-4": {