Update php.yml #10
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: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-versions: | |
- '7.4' | |
- '8.0' | |
- '8.3' | |
include: | |
- php-version: '8.4' | |
experimental: true | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Setup PHP Version ${{ matrix.php-versions }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
- name: Check syntax error in sources | |
run: find . -type f -name '*.php' -print0 | xargs -0 -L 1 -P 4 -- php -l | |
- name: Clear cache of Composer | |
run: composer clear-cache | |
- name: Validate Composer.json and composer.lock | |
run: composer update | |
- name: Install dependencies | |
run: composer install -q -n -a --no-progress --prefer-dist | |
- name: Check code styles | |
continue-on-error: true | |
run: ./vendor/bin/phpcs |