diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39a0c1c..43d0140 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 diff --git a/.gitignore b/.gitignore index ebdc0bf..50ece6c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ composer.lock /build/ .atoum.php phpunit.xml +.phpunit.result.cache behat.yml # OSX diff --git a/composer.json b/composer.json index 11c5c1b..475b6a2 100644 --- a/composer.json +++ b/composer.json @@ -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" },