From 790f42c495a0ef4b7520785b9e669d84584dd7aa Mon Sep 17 00:00:00 2001 From: Carlos C Soto Date: Fri, 3 Sep 2021 20:49:09 -0500 Subject: [PATCH] Upload code coverage to Scrutinizer --- .github/workflows/build.yml | 9 ++++++++- .scrutinizer.yml | 6 ++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5aef823..6c52e61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: run: php-cs-fixer fix --dry-run --format=checkstyle | cs2pr - name: Tests (phpunit with code coverage) - run: vendor/bin/phpunit --testdox --verbose --coverage-xml=build/coverage --log-junit=build/coverage/junit.xml + run: vendor/bin/phpunit --testdox --verbose --coverage-clover=build/coverage-clover.xml --coverage-xml=build/coverage --log-junit=build/coverage/junit.xml - name: Code analysis (phpstan) run: phpstan analyse --no-progress --verbose @@ -61,6 +61,13 @@ jobs: - name: Mutation testing analysis run: infection --skip-initial-tests --coverage=build/coverage --no-progress --no-interaction --logger-github + # see https://github.com/marketplace/actions/action-scrutinizer + - name: Upload code coverage to scrutinizer + uses: sudo-bot/action-scrutinizer@latest + with: + cli-args: "--format=php-clover build/coverage-clover.xml" + continue-on-error: true + build: # this job runs tests on all php supported versions name: PHP ${{ matrix.php-versions }} (tests) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index be36184..bf297bf 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -15,7 +15,5 @@ build: tests: override: - php-scrutinizer-run --enable-security-analysis - - command: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover - coverage: - file: coverage.clover - format: clover +tools: + external_code_coverage: true \ No newline at end of file