Skip to content

Chore/php82 ci polish #11

Chore/php82 ci polish

Chore/php82 ci polish #11

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.2', '8.3', '8.4', '8.5' ]
deps: [ 'stable' ]
include:
- php: '8.2'
deps: 'lowest'
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, curl
coverage: none
- name: Validate composer.json
run: composer validate --strict
- name: Install dependencies
run: |
if [ "${{ matrix.deps }}" = "lowest" ]; then
composer update --prefer-lowest --prefer-stable --no-interaction --no-progress
else
composer install --no-interaction --no-progress --prefer-dist
fi
- name: Run tests
run: vendor/bin/phpunit
- name: Lint PHP files
run: find src tests -type f -name '*.php' -print0 | xargs -0 -n1 php -l
- name: Run PHPStan
run: vendor/bin/phpstan analyse --configuration=phpstan.neon.dist --no-progress