Skip to content

Commit

Permalink
Enable and run coverage only for php 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Ndiritu committed Jan 30, 2024
1 parent 878d1af commit 807fe26
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,19 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
coverage: ${{ matrix.php-versions == '7.4' ? none : xdebug }}
- name: Install dependencies
run: composer install
- name: Run static analysis
run: ./vendor/bin/phpstan
- name: Run tests
- name: Run tests without coverage
if: ${{ matrix.php-versions != '8.0' }}
run: ./vendor/bin/phpunit
- name: Run tests with coverage
if: ${{ matrix.php-versions == '8.0' }}
run: ./vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Fix code coverage paths
if: ${{ matrix.php-versions == '8.0' }}
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
- name: SonarCloud Scan
if: ${{ matrix.php-versions == '8.0' && !github.event.pull_request.head.repo.fork }}
Expand Down

0 comments on commit 807fe26

Please sign in to comment.