Update to PHP 8.1, Symfony 6/7 #22
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: PHP tests | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
matrix: | |
php: ['8.1', '8.2', '8.3'] | |
symfony: ['6.4', '7.1'] | |
exclude: | |
- php: '8.1' | |
symfony: '7.1' | |
runs-on: ubuntu-latest | |
name: On PHP ${{ matrix.php }} and Symfony ${{ matrix.symfony }} | |
steps: | |
# https://github.com/marketplace/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# https://github.com/marketplace/actions/setup-php-action | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: mbstring, intl | |
ini-values: post_max_size=256M, max_execution_time=180 | |
- name: Check PHP version | |
run: php -v | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Install Symfony ${{ matrix.symfony }} packages | |
run: | | |
composer update symfony/http-kernel:^${{ matrix.symfony }} | |
- name: Lint PHP files | |
run: | | |
curl -Ls https://github.com/overtrue/phplint/releases/latest/download/phplint.phar -o /usr/local/bin/phplint | |
chmod +x /usr/local/bin/phplint | |
/usr/local/bin/phplint --no-cache --no-progress -v | |
- name: Coding standards | |
run: ./vendor/bin/phpcs | |
- name: PHPUnit | |
run: ./vendor/bin/phpunit |