Skip to content

Add support for PHP up to 8.3 #83

Add support for PHP up to 8.3

Add support for PHP up to 8.3 #83

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
env:
CODE_COVERAGE: none
strategy:
matrix:
operating-system:
- ubuntu-20.04
- macos-latest
- windows-latest
php-version:
- '7.1'
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
- '8.2'
- '8.3'
name: PHP ${{ matrix.php-version }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
if: "!startsWith(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Enable code coverage
if: matrix.operating-system == 'ubuntu-20.04' && matrix.php-version == '7.2'
run: echo "CODE_COVERAGE=xdebug" >> $GITHUB_ENV
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: 'mbstring, openssl, zip'
tools: 'composer:v2'
coverage: ${{ env.CODE_COVERAGE }}
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Avoid installing PHP-CS-Fixer
run: composer remove --dev --no-update --ansi --no-interaction friendsofphp/php-cs-fixer
- name: Install dependencies
run: composer update --no-progress --optimize-autoloader --ansi --no-interaction
- name: Perform tests
if: env.CODE_COVERAGE == 'none'
run: composer run-script test -- --verbose
- name: Perform tests (with code coverage)
if: env.CODE_COVERAGE != 'none'
run: composer run-script test -- --verbose --do-not-cache-result --coverage-clover code-coverage.xml
- name: Upload code coverage
if: env.CODE_COVERAGE != 'none'
uses: codecov/codecov-action@v1
with:
file: code-coverage.xml
flags: unittests