Run lint only for the newest PHP version #181
Workflow file for this run
This file contains hidden or 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 ] | ||
| 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 | ||