Skip to content

feat(fuzz): branch-complete case generation across composition choice… #1085

feat(fuzz): branch-complete case generation across composition choice…

feat(fuzz): branch-complete case generation across composition choice… #1085

Workflow file for this run

name: CI
on:
push:
branches: [main, 1.x]
pull_request:
branches: [main, 1.x]
workflow_call:
permissions:
contents: read
jobs:
tests:
name: PHP ${{ matrix.php }} / PHPUnit ${{ matrix.phpunit }}${{ matrix.deps == 'lowest' && ' / lowest deps' || '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: '8.3'
phpunit: '12'
deps: highest
- php: '8.3'
phpunit: '12'
deps: lowest
- php: '8.4'
phpunit: '12'
deps: highest
- php: '8.4'
phpunit: '13'
deps: highest
- php: '8.5'
phpunit: '12'
deps: highest
- php: '8.5'
phpunit: '13'
deps: highest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install dependencies
run: |
if [ "${{ matrix.deps }}" = "lowest" ]; then
composer update --with "phpunit/phpunit:^${{ matrix.phpunit }}.0" --prefer-lowest --prefer-dist --no-interaction --no-progress
else
composer update --with "phpunit/phpunit:^${{ matrix.phpunit }}.0" --prefer-dist --no-interaction --no-progress
fi
- name: Run tests
run: vendor/bin/phpunit
pest:
name: Pest plugin smoke (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
# Pest 4 requires PHPUnit ^12; the mainline matrix also runs PHPUnit 13.
# Keeping this job on PHPUnit 12 isolates the Pest plugin without forcing
# the rest of the matrix to drop PHPUnit 13. Pest is added on demand
# rather than to require-dev so the regular composer install used by the
# matrix above stays Pest-free.
#
# The matrix covers the full supported PHP range and catches regressions on
# the Pest internals the dispatcher depends on (HigherOrderTapProxy,
# PendingCalls\TestCall, dynamic property access).
strategy:
fail-fast: false
matrix:
php: ['8.3', '8.4', '8.5']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install dependencies (with Pest 4)
# Single resolve: any version conflict surfaces as one dependency
# tree in the CI log, not as a "no-update succeeded but update
# failed" two-step that obscures which constraint introduced the
# conflict.
run: composer require --dev "pestphp/pest:^4.0" --prefer-dist --no-interaction --no-progress
- name: Run Pest smoke tests
run: composer test:pest
pest-example:
name: Pest plugin example
runs-on: ubuntu-latest
# The runnable example under examples/pest/ tracks the working tree via a
# path repository. Without this job the example silently rots whenever the
# library's public API surface, composer.json, or autoload.files entry
# changes. Single PHP cell is enough — the example exists to teach, not
# cover the matrix.
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.3'
coverage: none
- name: Install example dependencies
working-directory: examples/pest
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run example Pest suite
working-directory: examples/pest
run: vendor/bin/pest --colors=always
psr7-example:
name: PSR-7 example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.3'
coverage: none
- name: Install example dependencies
working-directory: examples/psr7
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run PSR-7 example
working-directory: examples/psr7
run: composer test
quickstart-examples:
name: ${{ matrix.example }} quickstart
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- example: core
php: '8.3'
- example: laravel
php: '8.3'
- example: symfony
php: '8.3'
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install quickstart dependencies
working-directory: examples/${{ matrix.example }}
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run quickstart
working-directory: examples/${{ matrix.example }}
run: composer test
docs:
name: Documentation site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: '24'
cache: npm
- name: Install documentation dependencies
run: npm ci
- name: Audit documentation dependencies
run: npm audit --audit-level=high
- name: Verify vendored Tombo assets
run: npm run docs:verify-tombo
- name: Build searchable documentation
env:
DOCS_VERSION: next
run: npm run docs:build
- name: Verify rendered documentation version
env:
DOCS_VERSION: next
run: npm run docs:verify-version
- name: Verify documentation accessibility invariants
run: npm run docs:verify-accessibility
- name: Verify documentation base path
run: npm run docs:verify-base
- name: Check documentation links
run: npm run docs:links
static-analysis:
name: PHPStan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.3'
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run PHPStan
run: vendor/bin/phpstan analyse
code-style:
name: PHP-CS-Fixer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.3'
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Check code style
run: vendor/bin/php-cs-fixer fix --dry-run --diff
composer-validate:
name: composer-validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
# Run on the lowest supported PHP so any constraint mismatch
# between composer.json's `php: ^8.3` and the resolved dependencies
# surfaces here, not at install time on a downstream consumer.
php-version: '8.3'
coverage: none
- name: Validate composer.json + composer.lock
run: composer validate --strict
composer-audit:
name: composer-audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
# Same rationale as composer-validate: the audit itself is
# platform-independent, but installing on the lowest PHP catches
# platform-constraint regressions in dependencies.
php-version: '8.3'
coverage: none
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Audit installed dependencies
run: composer audit --abandoned=fail
markdown-lint:
name: Markdown Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.3'
coverage: none
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: '24'
- name: Verify Node toolchain is usable
run: |
node --version
npx --version
- name: Install PHP dependencies
run: composer install --prefer-dist --no-interaction --no-progress
- name: Run markdown lint test
run: vendor/bin/phpunit --filter MarkdownCoverageRendererLintTest