Skip to content

Commit

Permalink
Use PHP 8-aware Scrutinizer CI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
aik099 committed Jul 9, 2024
1 parent 742dafd commit d9f23e3
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -58,12 +60,17 @@ jobs:
mkdir -p build/logs
vendor/bin/phpunit --configuration ${{ matrix.phpunit_config }} --coverage-clover build/logs/clover.xml
- name: Downloading Scrutinizer CI binary
run: wget https://scrutinizer-ci.com/ocular.phar

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

- name: Uploading code coverage to Scrutinizer CI
run: php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- name: Upload Coverage to Scrutinizer CI (PHP < 8.0)
if: "${{ matrix.php < '8.0' }}"
run: |
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --repository=g/console-helpers/code-insight --format=php-clover coverage.clover
- name: Upload Coverage to Scrutinizer CI (PHP >= 8.0)
if: "${{ matrix.php >= '8.0' }}"
run: |
composer require scrutinizer/ocular
vendor/bin/ocular code-coverage:upload --repository=g/console-helpers/code-insight --format=php-clover coverage.clover

0 comments on commit d9f23e3

Please sign in to comment.