Skip to content

Commit

Permalink
Remove conditional PHPUnit paths from GHA workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
schlessera committed Jan 21, 2025
1 parent b380380 commit f09ca3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/quicktest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,9 @@ jobs:
id: phpunit_version
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT

- name: Run the unit tests (PHPUnit < 10)
if: ${{ ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
- name: Run the unit tests
run: composer test

- name: Run the unit tests (PHPUnit 10+)
if: ${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
run: composer test10

- name: Stop proxy server
continue-on-error: true
run: |
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,14 @@ jobs:
id: phpunit_version
run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT

- name: Run the unit tests, no code coverage (PHPUnit < 10)
if: ${{ matrix.coverage == false && ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
- name: Run the unit tests, no code coverage
if: ${{ matrix.coverage == false }}
run: composer test

- name: Run the unit tests, no code coverage (PHPUnit 10+)
if: ${{ matrix.coverage == false && startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
run: composer test10

- name: Run the unit tests with code coverage (PHPUnit < 10)
if: ${{ matrix.coverage == true && ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
- name: Run the unit tests with code coverage
if: ${{ matrix.coverage == true }}
run: composer coverage -- --coverage-clover clover.xml

- name: Run the unit tests with code coverage (PHPUnit 10+)
if: ${{ matrix.coverage == true && startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
run: composer coverage10 -- --coverage-clover clover.xml

- name: Stop proxy server
continue-on-error: true
run: |
Expand Down

0 comments on commit f09ca3e

Please sign in to comment.