Skip to content

fix(workflows): filter abstract test base classes out of matrix shards#375

Merged
mage-os-ci merged 1 commit into
mainfrom
fix/exclude-abstract-tests-from-matrix
May 18, 2026
Merged

fix(workflows): filter abstract test base classes out of matrix shards#375
mage-os-ci merged 1 commit into
mainfrom
fix/exclude-abstract-tests-from-matrix

Conversation

@rhoerr
Copy link
Copy Markdown
Contributor

@rhoerr rhoerr commented May 18, 2026

Summary

Follow-up to #372 / #373 / #374.

The "Create Mage-OS testsuite" step already excludes Abstract*Test.php / *AbstractTest.php files when they are discovered under a <directory> entry. But the EXCLUSION_LIST modules (Catalog, Bundle, Sales, AsynchronousOperations) are pre-expanded in matrix-calculator into comma-separated lists of individual *.php files, which the testsuite step emits as <file> entries — bypassing the directory-side filter.

Result: the latest full-suite run still has 13 shards failing solely because PHPUnit 12 emits a runner warning for loading an abstract class, which produces exit 1:

  • Catalog shards (jobs 76371189497, 505, 508, 511, 515, 535, 555, 569) — AbstractSaveAttributeTest, AbstractDeleteAttributeControllerTest, AbstractAlertTest, AbstractRelationsDataProviderTest, AbstractEavTest, AbstractAttributeTest, AbstractCurrencyTest, AbstractRenderCustomOptionsTest, AbstractUpdateAttributeTest, AbstractLinksTest
  • Bundle shards (jobs 76371189528, 541) — AbstractBundleOptionsViewTest, AbstractBundleProductSaveTest
  • Sales shards (jobs 76371189542, 547, 556) — AbstractAddressFormTest, AbstractInvoiceControllerTest, AbstractCollectorPositionsTest

All are EXCLUSION_LIST modules — confirmed not a coincidence.

Fix

Add ! -name 'Abstract*Test.php' ! -name '*AbstractTest.php' to the find in EXCLUSION_LIST_FILES so abstract base classes never enter the matrix in the first place. The directory-side exclude loop in the testsuite-generation step remains authoritative for non-EXCLUSION_LIST shards — both layers stay complementary, not duplicate.

Test plan

  • Trigger Integration Tests - Full Test Suite workflow_dispatch against a Magento 2 head
  • Confirm previously-failing Catalog / Bundle / Sales shards now exit 0
  • Confirm no shard skips concrete tests that previously ran

🤖 Generated with Claude Code

…shards

The "Create Mage-OS testsuite" step already excludes Abstract*Test.php /
*AbstractTest.php files discovered under <directory> entries, but EXCLUSION_LIST
modules (Catalog, Bundle, Sales, AsynchronousOperations) are pre-expanded in
matrix-calculator to comma-separated lists of individual *.php files that land
as <file> entries — bypassing the directory-side filter and tripping PHPUnit 12
"abstract class" runner warnings (exit 1).

Filter at the find(1) call so abstract files never enter the matrix in the
first place. Keeps the directory-side exclude loop authoritative for the
non-EXCLUSION_LIST shards.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@rhoerr rhoerr requested a review from a team as a code owner May 18, 2026 02:44
@mage-os-ci mage-os-ci merged commit 3fd484a into main May 18, 2026
2 checks passed
@mage-os-ci mage-os-ci deleted the fix/exclude-abstract-tests-from-matrix branch May 18, 2026 02:46
rhoerr pushed a commit that referenced this pull request May 27, 2026
…setup time (#381)

PHPUnit 12 emits a runner warning for every abstract class whose filename
ends in Test.php, causing exit code 2 which Nx treats as failure even when
all real tests pass.

At setup time, use find to discover all Abstract*Test.php / *AbstractTest.php
files in the testsuite directory and inject <exclude> entries into
phpunit.xml.dist for the Magento Integration Tests Real Suite. This mirrors
the find-based filter added to the full-suite workflow in #375.

The patched phpunit.xml.dist is included in the project cache so all
matrix runners pick it up without repeating the work.
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.

2 participants