Skip to content

Add tests to CI

Add tests to CI #12

Workflow file for this run

name: CI
on:
pull_request: ~
push: ~
jobs:
test:
name: PHP ${{ matrix.php-version }}
strategy:
fail-fast: false
matrix:
include:
- php-version: '7.4'
- php-version: '8.0'
- php-version: '8.1'
- php-version: '8.2'
- php-version: '8.3'
- php-version: '8.4'
phpunit-flags: --display-deprecations --fail-on-deprecation
- php-version: '8.5'
phpunit-flags: --display-deprecations --fail-on-deprecation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, curl, dom, json, mbstring, tokenizer, xml, xmlwriter
ini-values: display_errors=On, display_startup_errors=On, error_reporting=-1, zend.assertions=1
- run: composer update
- if: matrix.php-version != '7.4' && matrix.php-version != '8.0' # These run PHPUnit 9, which does not have the option
run: vendor/bin/phpunit --check-php-configuration
- run: vendor/bin/phpunit tests --no-configuration ${{ matrix.phpunit-flags }}