Drop support for PHP 8.0 and run CI for PHP 8.3 #196
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: "PHP ${{ matrix.php }} + Composer ${{ matrix.composer-flags }}" | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- php: '8.1' | |
- php: '8.2' | |
- php: '8.3' | |
ignore-php-version: true | |
calculate-code-coverage: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up PHP with PECL extension | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php || '8.3' }} | |
coverage: xdebug | |
extensions: ctype, json, mbstring | |
tools: composer | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
- name: Cache Composer packages | |
id: composer-cache | |
uses: actions/cache@v3 | |
with: | |
path: vendor | |
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
restore-keys: | | |
${{ runner.os }}-php- | |
- name: Install composer dependencies | |
run: composer update --prefer-dist --no-interaction --no-progress ${{ matrix.composer-flags }} | |
- name: Run static analysis | |
run: composer run-static-analysis | |
continue-on-error: ${{ matrix.continue-on-error || false }} | |
- name: Check code style | |
run: composer check-code-style | |
if: matrix.ignore-php-version == true | |
env: | |
PHP_CS_FIXER_IGNORE_ENV: 1 | |
- name: Check for security vulnerabilities in 3rd party dependencies | |
run: composer audit | |
- name: Run test suite | |
run: composer run-tests-with-clover | |
- name: Upload coverage results to Coveralls | |
if: matrix.calculate-code-coverage == true | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: "PHP ${{ matrix.php }} + Composer@${{ matrix.composer-flags || '*' }}" | |
run: bin/php-coveralls -v --exclude-no-stmt |