Skip to content

fix(tests): exit non-zero when the TestBootstrapper cannot be found - #68

Merged
Jozsef Damokos (jozsefdamokos) merged 3 commits into
trunkfrom
fix/phpunit-bootstrap-exit-code
Sep 10, 2026
Merged

Jozsef Damokos (jozsefdamokos) merged 3 commits into
trunkfrom
fix/phpunit-bootstrap-exit-code

Conversation

@jozsefdamokos

@jozsefdamokos Jozsef Damokos (jozsefdamokos) commented Sep 9, 2026 •

Copy link
Copy Markdown
Member

1. exit(1) in the test bootstrap. exit('message') terminates with status 0, so failing to locate the platform TestBootstrapper left the PHPUnit job green with zero tests executed.

2. Codecov coverage reporting

Part of shopware/shopware#18667.

exit('message') terminates the process with status 0, so a failure to locate
the platform TestBootstrapper left the PHPUnit job green with not a single
test executed. The three fallback paths exist because the platform layout
already moved twice (shopware/platform monorepo, shopware/core split,
in-tree), so a third move would have silently greened this job.

CompletionGuard cannot cover this: it is registered inside
TestBootstrapper::bootstrap(), which is never reached here.

Refs shopware/shopware#18667
The job already ran with pcov enabled but passed no --coverage flag and
phpunit.xml.dist configures no report, so every leg paid for line
instrumentation and produced nothing.

Coverage is now generated and uploaded once — from the mysql:8.0 / PHP 8.3 leg,
since all four legs cover the same lines — and pcov is switched off on the
other three, which no longer pay for it. Only the Integration workflow opts in:
it runs on pull requests and on push to trunk, so Codecov gets the trunk
baseline its project status compares against. Nightly and compat-check run
against other platform and assistant branches, so their coverage would not be
comparable and stays off.

.github/codecov.yml sets the project and patch thresholds. Neither status is a
required check in this repository, so a coverage drop reports red without
blocking a merge.

Refs shopware/shopware#18667
@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

SwagCmsExtensions, SwagSocialShopping and SwagPublisher all upload clover from
an absolute working directory with root_dir set, and so does
shopware/github-actions/phpunit. Matching that keeps the four migration
repositories from being a fifth dialect, and clover is the format the PHPUnit
shipped with Shopware 5 also understands, so every repository can use one.

Drops .github/codecov.yml: no other plugin ships one, Codecov posts both
statuses from its own defaults without it, and the file only replaced those
defaults with the platform's tolerances.
@jozsefdamokos
Jozsef Damokos (jozsefdamokos) merged commit 84ee326 into trunk Sep 10, 2026
15 checks passed
@jozsefdamokos
Jozsef Damokos (jozsefdamokos) deleted the fix/phpunit-bootstrap-exit-code branch September 10, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants