Increase PHP requirement to 8.1 #50
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: | |
pull_request: | |
jobs: | |
supported-versions-matrix: | |
name: Supported Versions Matrix | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.supported-versions-matrix.outputs.version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- id: supported-versions-matrix | |
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1 | |
test: | |
name: Run Tests and Code Quality on PHP ${{ matrix.php }} | |
runs-on: ubuntu-latest | |
needs: | |
- supported-versions-matrix | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP, extensions and composer with shivammathur/setup-php | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, ctype, iconv, bcmath, filter, json | |
coverage: xdebug, pcov | |
tools: composer:v2 | |
- name: Get composer cache directory | |
id: composer-cache | |
run: | | |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('**/composer.json') }} | |
restore-keys: | | |
composer-${{ runner.os }}-${{ matrix.php }} | |
composer-${{ runner.os }}- | |
composer- | |
- name: Install Composer dependencies | |
run: composer install --no-progress --no-interaction --optimize-autoloader --ansi | |
- name: Test | |
run: | | |
./vendor/bin/phpunit --coverage-text | |
php -n examples/benchmark-emit-no-arguments.php | |
php -n examples/benchmark-emit-one-argument.php | |
php -n examples/benchmark-emit.php | |
php -n examples/benchmark-emit-once.php | |
php -n examples/benchmark-remove-listener-once.php |