ci: Add PHP 8.4 #344
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: AutoReview | |
env: | |
PHP_CS_FIXER_IGNORE_ENV: 1 | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: null | |
schedule: | |
# Do not make it the first of the month and/or midnight since it is a very busy time | |
- cron: "* 10 5 * *" | |
jobs: | |
tests: | |
runs-on: "ubuntu-latest" | |
name: "${{ matrix.check.name }} (PHP ${{ matrix.php }})" | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [ "8.4" ] | |
check: | |
- name: "PHPStan" | |
command: "make phpstan" | |
- name: "CS" | |
command: "make cs_lint" | |
- name: "PHPUnit AutoReview" | |
command: "make phpunit_autoreview" | |
- name: "Rector" | |
command: "make rector_lint" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Setup PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php }}" | |
tools: "composer" | |
- name: "Install Composer dependencies" | |
uses: "ramsey/composer-install@v3" | |
- name: "Install PHP-CS-Fixer dependencies" | |
if: "${{ matrix.name == 'CS' }}" | |
uses: "ramsey/composer-install@v3" | |
with: | |
working-directory: vendor-bin/php-cs-fixer | |
- name: "Install Rector dependencies" | |
if: "${{ matrix.name }} == 'Rector'" | |
uses: "ramsey/composer-install@v3" | |
with: | |
working-directory: vendor-bin/rector | |
- name: "Run ${{ matrix.check.name }}" | |
run: "${{ matrix.check.command }}" | |
# This is a "trick", a meta task which does not change, and we can use in | |
# the protected branch rules as opposed to the individual tests which | |
# may change regularly. | |
validate-tests: | |
name: "AutoReview Status" | |
runs-on: "ubuntu-latest" | |
needs: | |
- "tests" | |
if: "always()" | |
steps: | |
- name: "Successful run" | |
if: "${{ !(contains(needs.*.result, 'failure')) }}" | |
run: "exit 0" | |
- name: "Failing run" | |
if: "${{ contains(needs.*.result, 'failure') }}" | |
run: "exit 1" |