Skip to content

Run lint only for the newest PHP version #181

Run lint only for the newest PHP version

Run lint only for the newest PHP version #181

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 37, Col: 21): Unexpected symbol: '"8'. Located at position 15 within expression: matrix.php == "8.5"
on: [ push ]
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.4', '8.5']
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
coverage: "none"
ini-values: "memory_limit=-1"
php-version: "${{ matrix.php }}"
tools: "composer"
- name: Display versions
run: |
php --version
php -r 'foreach (get_loaded_extensions() as $extension) echo $extension . " " . phpversion($extension) . PHP_EOL;'
php -i
- name: Install Composer
run: composer install --optimize-autoloader --classmap-authoritative --no-interaction
- name: Run Linters
run: composer run-script lint
# lint will fail for older PHP versions, so only run it on the newest version
if: matrix.php == "8.5"
- name: Run Tests
run: composer run-script test