Skip to content

Commit a446c08

Browse files
committed
phpunit fixes + fix nasty bug with phpstanTestcase unit tests
1 parent 439a5ca commit a446c08

20 files changed

+842
-64
lines changed

.github/workflows/tests.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
strategy:
2222
fail-fast: true
2323
matrix:
24-
php: ['8.1','8.2']
25-
stability: [prefer-lowest, prefer-stable]
24+
php: [ '8.1','8.2' ]
25+
stability: [ prefer-lowest, prefer-stable ]
2626

2727
steps:
2828
- name: Checkout Code
@@ -59,7 +59,12 @@ jobs:
5959
command: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress --quiet
6060

6161
- name: Execute PHPUnit
62+
run: vendor/bin/phpunit
63+
if: ${{ !env.CC_TOKEN || (matrix.stability != 'prefer-stable' && matrix.php != '8.2') }}
64+
65+
- name: Execute PHPUnit for codeclimate
6266
run: vendor/bin/phpunit --coverage-clover=coverage.xml
67+
if: ${{ env.CC_TOKEN && matrix.stability == 'prefer-stable' && matrix.php == '8.2' }}
6368

6469
- name: Upload coverage to codeclimate
6570
uses: paambaati/[email protected]
@@ -69,4 +74,4 @@ jobs:
6974
with:
7075
coverageCommand: ''
7176
coverageLocations: ./coverage.xml:clover
72-
if: ${{ !env.ACT && env.CC_TOKEN && matrix.stability == 'prefer-stable' && matrix.php == '8.2' }}
77+
if: ${{ env.CC_TOKEN && matrix.stability == 'prefer-stable' && matrix.php == '8.2' }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.phpunit.result.cache
55
build
66
coverage
7+
coverage.xml
78
composer.lock
89
testbench.yaml
910
vendor

0 commit comments

Comments
 (0)