Skip to content

Commit

Permalink
Remove PHPUnit workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Dec 19, 2023
1 parent c2cae62 commit fbabda2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.1'
coverage: 'none'
- name: Cache dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -52,8 +52,11 @@ jobs:
- ""
include:
- os: windows-latest
php_version: 8.0
php_version: 8.1
dependencies_level: --prefer-lowest
- os: windows-latest
php_version: 8.1
dependencies_level: ''
runs-on: ${{ matrix.os }}
steps:
- name: Set git to use LF on windows
Expand All @@ -76,22 +79,14 @@ jobs:
key: "cache-composer-${{ hashFiles('composer.json') }}"
restore-keys: 'cache-composer-'
- name: Run composer
if: ${{ matrix.php_version != '8.0' && matrix.php_version != '8.1' && matrix.php_version != '8.2' && matrix.php_version != '8.3' }}
run: composer update ${{ matrix.dependencies_level }} --prefer-dist --no-interaction --no-progress
- name: Run composer with workaround for PHP 8 and incompatible PHPUnit
if: ${{ matrix.php_version == '8.0' || matrix.php_version == '8.1' || matrix.php_version == '8.2' || matrix.php_version == '8.3' }}
run: composer update ${{ matrix.dependencies_level }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress
- name: Check composer.json
run: composer normalize --dry-run
- name: Run tests with coverage
if: ${{ matrix.php_version != '8.0' && matrix.php_version != '8.1' && matrix.php_version != '8.2' && matrix.php_version != '8.3' }}
if: ${{ matrix.os != 'windows-latest' && matrix.php_version == '8.1' && matrix.dependencies_level != '--prefer-lowest' }}
run: php vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Run tests
if: ${{ matrix.php_version == '8.0' }}
run: vendor/bin/phpunit
- name: Run tests
if: ${{ matrix.php_version == '8.1' }}
run: vendor/bin/phpunit --no-configuration --bootstrap=tests/bootstrap.php --dont-report-useless-tests vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php
- name: Run integration tests
run: vendor/bin/phpcs -s --standard=MO4 integrationtests/testfile.php
- name: Run PHPStan
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ composer.lock
/build/
.atoum.php
phpunit.xml
.phpunit.result.cache
behat.yml

# OSX
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"dealerdirect/phpcodesniffer-composer-installer": "~0.7 || ~1.0",
"escapestudios/symfony2-coding-standard": "^3.10.0",
"slevomat/coding-standard": "^8.14",
"squizlabs/php_codesniffer": "^3.6.2"
"squizlabs/php_codesniffer": "^3.8.0"
},
"require-dev": {
"ergebnis/composer-normalize": ">=2.19 <2.30",
"phan/phan": "^5.4.2",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^7.0",
"phpunit/phpunit": "^7.5.20 || ^8.5.36 || ^9.6.15",
"psalm/plugin-phpunit": "^0.18",
"vimeo/psalm": "^4.30"
},
Expand Down

0 comments on commit fbabda2

Please sign in to comment.