Skip to content

Commit

Permalink
Drop PHP 7.1 and 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rodion-arr committed Apr 30, 2021
1 parent 63ee724 commit 80d1a15
Show file tree
Hide file tree
Showing 3 changed files with 825 additions and 324 deletions.
63 changes: 49 additions & 14 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: PHP Composer

on:
schedule:
- cron: '23 4 * * *' # Once, nightly
push:
branches: [ master ]
pull_request:
Expand All @@ -11,22 +13,55 @@ jobs:

runs-on: ubuntu-latest

env:
PHP_EXTENSIONS: dom, json, libxml, mbstring, pdo_sqlite, soap, xml, xmlwriter
PHP_INI_VALUES: assert.exception=1, zend.assertions=1

strategy:
fail-fast: false
matrix:
php-version:
- "7.3"
- "7.4"
- "8.0"

compiler:
- default

include:
- os: ubuntu-latest
php-version: "8.0"
compiler: jit
dependencies: highest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Override PHP ini values for JIT compiler
if: matrix.compiler == 'jit'
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=32M" >> $GITHUB_ENV

- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}

- name: Validate composer.json and composer.lock
run: composer validate
- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: composer run-script test-ci
- name: Run test suite
run: composer run-script test-ci

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"require": {
"php": "^7.1.0"
"php": "^7.3.0|^8.0.0"
},
"autoload": {
"psr-4": {
Expand All @@ -21,6 +21,6 @@
"phpunit/phpunit": "^9.1"
},
"scripts": {
"test-ci": "./vendor/bin/phpunit -v --coverage-clover=coverage.xml --coverage-text --debug --colors=never"
"test-ci": "XDEBUG_MODE=coverage ./vendor/bin/phpunit -v --coverage-clover=coverage.xml --coverage-text --debug --colors=never"
}
}
Loading

0 comments on commit 80d1a15

Please # to comment.