From 8f8d29b8cd786e19a7afa837084078fcee79aa21 Mon Sep 17 00:00:00 2001 From: Eugene Bravov Date: Sun, 24 Jan 2021 11:43:26 +0300 Subject: [PATCH] Add php8 support --- .github/workflows/test.yml | 46 +++++++++++++++++--------------------- composer.json | 2 +- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c7edb99..559d753 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,33 +2,29 @@ name: Tests on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: tests: - - runs-on: ubuntu-latest - + runs-on: ${{ matrix.operating-system }} + strategy: + matrix: + operating-system: [ubuntu-latest] + php-versions: ["7.2", "7.3", "7.4", "8.0"] + name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }} steps: - - uses: actions/checkout@v2 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v2 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- - - - name: Install dependencies - if: steps.composer-cache.outputs.cache-hit != 'true' - run: composer install --prefer-dist --no-progress --no-suggest - - - name: Run test suite - run: composer run-script test + - uses: actions/checkout@v2 + - name: Install PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + - name: Validate composer.json + run: composer validate + + - name: Install dependencies + run: composer install --prefer-dist --no-progress --no-suggest + + - name: Run test suite + run: composer run-script test diff --git a/composer.json b/composer.json index 6aeb35a..e888dcd 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ } ], "require": { - "php": "^7.2", + "php": "^7.2||^8.0", "ext-json": "*", "twig/twig": "^2.0||^3.0" },