ci: add unit test workflow and minimal test bootstrap#57
Merged
DavidLambauer merged 1 commit intomage-os-lab:mainfrom Apr 19, 2026
Merged
ci: add unit test workflow and minimal test bootstrap#57DavidLambauer merged 1 commit intomage-os-lab:mainfrom
DavidLambauer merged 1 commit intomage-os-lab:mainfrom
Conversation
Extract CI infrastructure from mage-os-lab#49 so tests run on main before any feature PR merges. Feature-specific tests remain with their respective PRs. - GitHub Actions workflow running PHP 8.2/8.3/8.4 via mage-os/github-actions - PHPUnit bootstrap using Magento's FactoryGenerator/ProxyGenerator - phpunit.xml.dist test runner config - ProductMockTrait for shared product mocking - RequestTest as a smoke test covering the existing Request DTO - composer.json: add magento/* framework deps required by the bootstrap (also resolves mage-os-lab#22, supersedes mage-os-lab#39)
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
Extracts the CI infrastructure from #49 onto main so every open PR gets CI coverage immediately, without waiting for the #45 -> #46 -> #49 stack to land.
#49 was merged into #46's branch rather than main, which means the test workflow currently only exists inside the unmerged feature stack. This PR lifts just the infrastructure (workflow + bootstrap + one smoke test) to main so CI runs on everything else in flight: #38, #39, #45, #46, #50, #51, plus my remaining #53, #54, #56.
Credit to @rhoerr for the original CI setup in #49. All the interesting bits are his work.
What's included
.github/workflows/unit-tests.yml: PHP 8.2/8.3/8.4 matrix viamage-os/github-actions/unit-test@mainTest/Unit/bootstrap.php: MagentoFactoryGenerator/ProxyGeneratorautoloader for standalone testingphpunit.xml.dist: test runner configTest/Unit/Trait/ProductMockTrait.php: shared product mock helper (only depends onMagento\Catalog\Model\Product)Test/Unit/Model/Product/RequestTest.php: smoke test against the existingRequestDTO on mainWhat's intentionally excluded
ConfigTest,EnrichmentRepositoryTest,EnricherTest, etc.). Those depend on classes that only exist in Make enrichment attributes configurable (#27) #45 / Add enrichment review, caching, and approval workflow (#28) #46 and should ride along with those PRs.EnrichmentMockTrait: depends onEnrichmentInterface, which only exists in Add enrichment review, caching, and approval workflow (#28) #46.Overlap note
composer.jsongains explicitmagento/framework/magento/module-*deps because the bootstrap needs them. That also resolves #22 and overlaps with @rhoerr's #39, which can be closed in favor of this once merged.Test plan