Skip to content

fix(ci): prove the PHPUnit suite actually ran - #27

Merged
Jozsef Damokos (jozsefdamokos) merged 4 commits into
trunkfrom
fix/phpunit-prove-the-suite-ran
Sep 10, 2026
Merged

Jozsef Damokos (jozsefdamokos) merged 4 commits into
trunkfrom
fix/phpunit-prove-the-suite-ran

Conversation

@jozsefdamokos

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

Copy link
Copy Markdown
Member
  1. Prove the PHPUnit suite actually ran
    CompletionGuard covers a mid-suite exit(0) from TestBootstrapper::bootstrap(), but it only exists on trunk — the 6.6.x leg of the PHPUnit matrix in php.yml and nightly.yml runs against a platform that does not have it, so that leg still goes green after an arbitrary prefix of the suite.
    The job greps the JUnit report for </testsuites> instead, which covers every matrix leg regardless of platform branch. PHPUnit writes the XML only after the runner finishes; asserting the file merely exists would not work, since a truncated run leaves it in place, empty.

  2. Add codecov

Part of shopware/shopware#18667.

exit()/die() reached from code under test kills PHPUnit mid-suite with a
success exit code, so the job went green after an arbitrary prefix of the
suite. CompletionGuard covers this from TestBootstrapper::bootstrap(), but it
only exists on trunk: the 6.6.x leg of the PHPUnit matrix in php.yml and
nightly.yml runs against a platform that does not have it.

The job now checks the JUnit report instead, which covers every matrix leg
regardless of platform branch: PHPUnit creates the report at startup and writes
the XML only once the runner has finished, so a report without </testsuites>
means the process died early. Asserting the file merely exists would not work —
a truncated run leaves it in place, empty.

Refs shopware/shopware#18667
Coverage comes from the trunk leg only: the 6.6.x leg covers the same lines
against an older platform, so uploading both would report the same file twice.
Only php.yml opts in — it runs on pull requests and on push to trunk, so
Codecov gets the trunk baseline its project status compares against, while
nightly adds nothing.

.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. CODECOV_TOKEN is an organization secret already available
here, so no new secret is needed.

Refs shopware/shopware#18667
@codecov-commenter

Codecov Comments Bot (codecov-commenter) commented Sep 9, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.99%. Comparing base (dab527d) to head (886fb14).
⚠️ Report is 10 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk      #27      +/-   ##
============================================
- Coverage     96.71%   93.99%   -2.73%     
  Complexity      100      100              
============================================
  Files            13       15       +2     
  Lines          1553     1582      +29     
============================================
- Hits           1502     1487      -15     
- Misses           51       95      +44     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.
Comment thread .github/workflows/action-phpunit.yml
@jozsefdamokos
Jozsef Damokos (jozsefdamokos) merged commit bdfbfa5 into trunk Sep 10, 2026
14 of 15 checks passed
@jozsefdamokos
Jozsef Damokos (jozsefdamokos) deleted the fix/phpunit-prove-the-suite-ran branch September 10, 2026 09:30
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