AutoReview #102
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" | |
on: | |
push: | |
branches: | |
- "main" | |
- "master" | |
pull_request: null | |
schedule: | |
- cron: '0 0 1 * *' | |
jobs: | |
phpstan: | |
runs-on: "ubuntu-latest" | |
name: "PHPStan on PHP ${{ matrix.php }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
php: | |
- "8.3" | |
steps: | |
- name: "Check out repository code" | |
uses: "actions/checkout@v3" | |
- name: "Setup PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
php-version: "${{ matrix.php }}" | |
tools: "composer" | |
- name: "Install Composer dependencies" | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: "highest" | |
- name: "Perform static analysis" | |
run: "make phpstan" | |
# This is a "trick", a meta task which does not change, and we can use in | |
# the protected branch rules as opposed to the E2E tests one above which | |
# may change regularly. | |
# This allows us to mark only this job as required instead of each individual | |
# ever-changing E2E tests. | |
validate-tests: | |
name: "AutoReview Status" | |
runs-on: "ubuntu-latest" | |
needs: | |
- "phpstan" | |
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" |