diff --git a/.github/workflows/php-test.yml b/.github/workflows/php-test.yml index e431bcb3b..f676280c2 100644 --- a/.github/workflows/php-test.yml +++ b/.github/workflows/php-test.yml @@ -72,7 +72,7 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - coverage: ${{ matrix.coverage == 'true' && 'xdebug' || 'none' }} + coverage: ${{ matrix.coverage && 'xdebug' || 'none' }} - name: Setup Node.js (.nvmrc) uses: actions/setup-node@v3 @@ -87,19 +87,19 @@ jobs: run: npm run wp-env start - name: Run tests - if: ${{ matrix.coverage != 'true' }} + if: ${{ ! matrix.coverage }} run: | npm run test-php npm run test-php-multisite - name: Run tests with coverage - if: ${{ matrix.coverage == 'true' }} + if: ${{ matrix.coverage }} run: | npm run test-php-coverage npm run test-php-multisite-coverage - name: Upload code coverage report - if: ${{ matrix.coverage == 'true' }} + if: ${{ matrix.coverage }} uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d with: file: build/logs/*.xml