Skip to content

doc: Provide a more up to date example of how to configure a before and after batch hook #40

doc: Provide a more up to date example of how to configure a before and after batch hook

doc: Provide a more up to date example of how to configure a before and after batch hook #40

Workflow file for this run

name: AutoReview
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.2" ]
check:
- name: "PHPStan"
command: "make phpstan"
- name: "CS"
command: "make cs_lint"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
tools: "composer"
coverage: "none"
- 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"