Skip to content

Close output buffer when exception occurs during setup (#607) #2605

Close output buffer when exception occurs during setup (#607)

Close output buffer when exception occurs during setup (#607) #2605

Workflow file for this run

name: Testing Suite
on:
push:
branches:
- main
- '*.x'
- '*.*.x'
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
lint:
uses: alleyinteractive/.github/.github/workflows/php-composer-command.yml@main
with:
command: "lint"
php: 8.2
phpunit:
strategy:
fail-fast: false
matrix:
dependencies: ["lowest", "highest"]
multisite: [true, false]
php: [8.1, 8.2, 8.3]
wordpress: ["latest"]
uses: alleyinteractive/.github/.github/workflows/php-tests.yml@main
name: "P${{ matrix.php }} - ${{ matrix.wordpress }} ${{ matrix.multisite && 'Multisite' || '' }} - ${{ matrix.dependencies }}"
with:
command: 'phpunit'
dependency-versions: ${{ matrix.dependencies }}
multisite: ${{ matrix.multisite }}
php: ${{ matrix.php }}
wordpress: ${{ matrix.wordpress }}
# This required job ensures that all PR checks have passed before merging.
all-pr-checks-passed:
name: All PR checks passed
needs:
- lint
- phpunit
runs-on: ubuntu-latest
if: always()
steps:
- name: Check job statuses
run: |
if [[ "${{ contains(needs.*.result, 'failure') }}" == "true" ]]; then
echo "One or more jobs failed"
exit 1
elif [[ "${{ contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
echo "One or more jobs were cancelled"
exit 1
else
echo "All jobs passed or were skipped"
exit 0
fi