fix(workflows): filter abstract test base classes out of matrix shards#375
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #372 / #373 / #374.
The "Create Mage-OS testsuite" step already excludes
Abstract*Test.php/*AbstractTest.phpfiles when they are discovered under a<directory>entry. But theEXCLUSION_LISTmodules (Catalog,Bundle,Sales,AsynchronousOperations) are pre-expanded inmatrix-calculatorinto comma-separated lists of individual*.phpfiles, 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:
AbstractSaveAttributeTest,AbstractDeleteAttributeControllerTest,AbstractAlertTest,AbstractRelationsDataProviderTest,AbstractEavTest,AbstractAttributeTest,AbstractCurrencyTest,AbstractRenderCustomOptionsTest,AbstractUpdateAttributeTest,AbstractLinksTestAbstractBundleOptionsViewTest,AbstractBundleProductSaveTestAbstractAddressFormTest,AbstractInvoiceControllerTest,AbstractCollectorPositionsTestAll are EXCLUSION_LIST modules — confirmed not a coincidence.
Fix
Add
! -name 'Abstract*Test.php' ! -name '*AbstractTest.php'to thefindinEXCLUSION_LIST_FILESso 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
Integration Tests - Full Test Suiteworkflow_dispatch against a Magento 2 head🤖 Generated with Claude Code