Skip to content

Preparation for PHP 8.4: Rector rules and CI compatibility check #63

Preparation for PHP 8.4: Rector rules and CI compatibility check

Preparation for PHP 8.4: Rector rules and CI compatibility check #63

name: Pull Request Check
on: [pull_request]
jobs:
unit-test:
name: Unit testing
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.3.29'
tools: composer
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v3
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('composer.lock') }}
- name: Installing dependencies
env:
COMPOSER_CACHE_DIR: /tmp/composer-cache
run: composer install --no-interaction --no-progress --prefer-dist
- name: Running unit test
run: vendor/bin/phpunit --configuration phpunit.xml
php84-syntax-check:
name: PHP 8.4 syntax compatibility
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup PHP 8.4
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer
coverage: none
- name: Check syntax on all PHP files
run: find src tests -name "*.php" -not -path "*/vendor/*" | xargs -I{} php -l {}