diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index f70e915..decc649 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -67,3 +67,13 @@ jobs: - name: Run unit tests if: ${{ matrix.php != '8.2' || matrix.redis != '7' }} run: vendor/bin/phpunit + + - name: Create coverage report + if: ${{ matrix.php == '8.2' && matrix.redis == '7' && github.repository == 'kodedphp/cache-simple' }} + run: vendor/bin/phpunit --coverage-clover build/clover.xml + + - name: Send coverage + uses: sudo-bot/action-scrutinizer@latest + if: ${{ matrix.php == '8.2' && matrix.redis == '7' && github.repository == 'kodedphp/cache-simple' }} + with: + cli-args: "--format=php-clover build/clover.xml --revision=${{ github.sha }}" diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..60eb51a --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,25 @@ +build: + nodes: + analysis: + tests: + stop_on_failure: true + override: + - php-scrutinizer-run + environment: + php: + version: '8.1.2' + +before_commands: + - 'composer update -o --prefer-source --no-interaction' + +filter: + excluded_paths: + - 'bench/*' + - 'build/*' + - 'tests/*' + - 'vendor/*' + +tools: + external_code_coverage: true + php_analyzer: true + php_code_sniffer: true