From e188acae5939ffc9d638efb2f32e3d7810fda549 Mon Sep 17 00:00:00 2001 From: Pierre Tondereau Date: Sun, 13 Sep 2020 13:10:39 +0200 Subject: [PATCH] ci: Add PHP8 in matrix tests. (#152) --- .github/workflows/ci.yml | 19 ++++++++++++++++--- composer.json | 4 ++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4a5c4e..b068c6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - php: [7.2, 7.3, 7.4] + php: [7.2, 7.3, 7.4, 8.0] extension: [':bcmath', ':gmp'] name: PHP ${{ matrix.php }} @@ -20,7 +20,20 @@ jobs: php-version: ${{ matrix.php }} coverage: xdebug extensions: ${{ matrix.extension }} - - run: composer install --prefer-dist --no-interaction + tools: composer:v2 + - name: Install PHP 8 Dependencies + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --no-interaction --no-progress --ignore-platform-req=php + if: "matrix.php >= 8" + - name: Install PHP 7 Dependencies + uses: nick-invision/retry@v1 + with: + timeout_minutes: 5 + max_attempts: 5 + command: composer update --no-interaction --prefer-dist --no-progress + if: "matrix.php < 8" - run: vendor/bin/phpunit --coverage-text - - run: vendor/bin/phpcs --standard=PSR12 --colors -n src tests diff --git a/composer.json b/composer.json index 52d7718..b1ab736 100644 --- a/composer.json +++ b/composer.json @@ -25,11 +25,11 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2 || ^8.0", "ext-mbstring": "*" }, "require-dev": { - "phpunit/phpunit": "^8.0", + "phpunit/phpunit": "^8.0 || ^9.3", "squizlabs/php_codesniffer": "^3.5" }, "suggest": {