Skip to content

Show what the field set refused #31

Show what the field set refused

Show what the field set refused #31

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ '8.3', '8.4', '8.5' ]
steps:
- uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring
coverage: none
tools: composer:v2
- name: Install dependencies
# No --prefer-dist: it overrides config.preferred-install, and the kit
# is installed from source here so its shared test fixtures
# (stubs.php, SelfReferences.php) are present. They are
# export-ignored, so a dist install does not carry them -- which
# is the point, since a dist install is what reaches a plugin.
run: composer install --no-progress --no-interaction
- name: Lint
run: find src tests -name '*.php' -print0 | xargs -0 -n1 -P4 php -l > /dev/null
- name: Coding standards
run: composer lint
- name: Formatting
# Separate from the lint: a clean lint does not mean a clean format
# check, and a green build has to mean both.
run: composer format:check
- name: Documentation
# The examples are checked against the registry: a configuration key
# nothing reads is not an error in PHP, so the only symptom of one is
# a documented option that quietly does nothing.
run: composer docs:verify
- name: Tests
# set -o pipefail, because a pipeline reports its last command and tee
# always succeeds -- without it a failing suite exits 0 and reads green.
run: |
set -o pipefail
composer test | tee phpunit.log
grep -qE 'OK \(|Tests: ' phpunit.log || {
echo '::error::phpunit produced no result -- the suite did not run'
exit 1
}