Skip to content

Commit

Permalink
chore: compute phpunit option for coverage
Browse files Browse the repository at this point in the history
Co-authored-by: John Paul E. Balandan, CPA <51850998+paulbalandan@users.noreply.github.com>
  • Loading branch information
kenjis and paulbalandan committed Jan 21, 2022
1 parent 9f3e8c6 commit ed67dcc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,15 @@ jobs:
if: matrix.php-versions == '8.0'
run: echo "TACHYCARDIA_MONITOR_GA=enabled" >> $GITHUB_ENV

- name: Test with PHPUnit w/o Coverage
if: matrix.php-versions != '8.0'
run: script -e -c "vendor/bin/phpunit --color=always --exclude-group=auto-review --no-coverage"
env:
DB: ${{ matrix.db-platforms }}
TERM: xterm-256color
- name: Compute coverage option
uses: actions/github-script@v3
id: phpunit-coverage-option
with:
script: 'return "${{ matrix.php-versions }}" == "8.0" ? "" : "--no-coverage"'
result-encoding: string

- name: Test with PHPUnit with Coverage
if: matrix.php-versions == '8.0'
run: script -e -c "vendor/bin/phpunit --color=always --exclude-group=auto-review"
- name: Test with PHPUnit
run: script -e -c "vendor/bin/phpunit --color=always --exclude-group=auto-review ${{ steps.phpunit-coverage-option.outputs.result }}"
env:
DB: ${{ matrix.db-platforms }}
TERM: xterm-256color
Expand Down

0 comments on commit ed67dcc

Please sign in to comment.