Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

CI and reproducing a red check

The continuous integration of the Exponential repository from a PHP developer's side - the Quality, PHPUnit, Performance and CI health workflows, what blocks, how a pull request is tested, and the local command for each…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/php-developers/ci-and-reproducing-a-red-check.md

On this page

CI and reproducing a red check

This page is for PHP developers whose commit or pull request to se7enxweb/exponential got a red check. It explains what runs, what blocks, and gives the command that reproduces each failing step on your machine. The full reference is Continuous integration: the workflows.

Contents

  1. The workflows
  2. Find the failed step
  3. Reproduce it locally
  4. Why CI and your machine disagree
  5. Pull requests

The workflows

WorkflowRunsJobsBlocks
Quality (quality.yml)every push to main and every pull requestsyntax, manifest, commit messages, code style (PHP 8.3); PHPStan (8.3); code style sniff tests (8.4); PHP 8.0 syntax and bootyes; code style is a warning, the manifest a warning on pull requests
PHPUnit (phpunit.yml)every push and pull requestPHPUnit without a database on PHP 8.1 to 8.5; database tests on MySQL 8.0 and PostgreSQL 15 (PHP 8.3)yes
Performance (performance.yml)changes to PHP, templates, settings or the benchmarkmicro benchmark (PHP 8.5) against tests/benchmark/baseline.jsonno
CI health (ci-health.yml)Mondays, and by handa report of pass rates and flaky testsno

Find the failed step

gh run list -R se7enxweb/exponential --limit 20
gh run view <run id> -R se7enxweb/exponential --log-failed      # only the failed steps' log
gh run rerun <run id> -R se7enxweb/exponential --failed         # run only the failed jobs again

Reproduce it locally

Run from the root of a checkout of the same commit; BASE is origin/main for a pull request.

Failed stepCommand
PHP syntax of changed filesgit diff --name-only --diff-filter=ACMR $BASE HEAD -- '*.php' | xargs -r -n1 php -l
JavaScript syntaxgit diff --name-only --diff-filter=ACMR $BASE HEAD -- '*.js' ':!*.min.js' | xargs -r -n1 node --check
File manifestphp bin/php/checkmanifest.php --all, fix with make manifest-fix
Commit messagessh .githooks/check-commit-range $BASE HEAD
Code stylemake phpcs BASE=$BASE
PHPStanmake devtools once, then make phpstan
Code style sniff testsvendor/bin/phpunit --testsuite quality --no-coverage (PHP 8.4)
PHP 8.0 syntax of every filemake lint80-all PHP80=/path/to/php8.0
PHP 8.0 production installin a clean checkout with PHP 8.0: composer install --no-dev --prefer-dist
Boot smoke testphp bin/php/ezexec.php tests/bin/bootsmoke.php with PHP 8.0
PHPUnitphp vendor/bin/phpunit <the failed test file>, then php vendor/bin/phpunit
Database testsphp -d date.timezone=America/Los_Angeles tests/runtests.php --dsn mysql://[email protected]/testdb --db-per-test against a throwaway database
Micro benchmarkphp bin/php/benchmark.php micro --baseline=tests/benchmark/baseline.json --all-checks with OPcache off

Never run CI's PHPUnit dependency step (composer update on a copied composer.json) inside an installed site: it rewrites vendor/.

Why CI and your machine disagree

SituationUsual causeWhat to do
a test passes locally, fails in CIthe test reads something of your installation: settings/override, a database, a cache in var/run it in a fresh clone with only vendor/ installed
a test passes alone, fails in the whole runshared state with another test: a static cache, an INI value set in-process, a file under var/run the two files together; reset the state in tearDown()
every PHPUnit leg fails at installa dependency release changed the resolution, or a repinned package is not on Packagist yetwait for the release on Packagist; check the constraint
only the PHP 8.1 leg failsan API of PHPUnit 10.5, or PHP 8.1 behaviorread the leg's log; avoid newer PHPUnit APIs
only php80 failssyntax or a function newer than 8.0, or a dependency that needs 8.1Writing code that runs on PHP 8.0

The jobs set COMPOSER_ROOT_VERSION=dev-main because a pull request is checked out as a detached merge commit, where Composer would otherwise name the root package dev-<sha> and packages requiring se7enxweb/exponential: ^6.0.14 could not be installed.

Pull requests

  • A pull request is tested as merged into main. A branch that was green can turn red when main moves: merge main into the branch and push again.
  • A pull request that conflicts with main gets no checks at all; resolve the conflict.
  • A new push to the branch cancels the run it replaces; a cancelled run is not a failure.
  • Composer installs are tried up to three times; every job has a 20 or 30 minute timeout.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x