Open damienwebdev opened 1 year ago
Assigning @DavidLambauer
To be clear, the expected outcome of this issue is to have a GitHub workflow running all the static tests (passing) and publish the build reports. correct?
@DavidLambauer I'm not particularly interested in the build report being publicly accessible in a "pretty format". Whatever the job outputs in CI is enough for me.
I started working on this one. Doing some notes-taking here. Don't mind it, yet.
graycoreio/github-actions-magento2/supported-version@main
to generate the matrix for the currently supported Magento 2 Versions. This action spits out a JSON with all the different PHP/Magento(And most likely more than that) combinations. Then, I can use that output in graycoreio/github-actions-magento2/setup-magento@main
to setup a Magento with the parameters that I got from the step before. setup-magento-extension (magento/project-community-edition:>=2.4.4 <2.4.5)
. The UI for this is horrible. I wonder if we can simplify the name generation somehow. Something like Magento 2.4.4 / PHP 8.1
would make more sense. The env variables for graycoreio/github-actions-magento2/setup-magento@main
are a little bit confusing. In particular:
extension,
and there is extensions
. extensions
refers to the PHP Extensions, so the naming could be php_extensions
to make it more clear. The extensions
variable does not affect anything right now; it is not used further. coverage
variable expects something like xDebug
and not a simple true/false
. I had to read the description twice to get it. Either, the description or the naming should be improved here. I have something running as a first draft. As I mentioned, I use the setup-magento
actions to get all the different Magento/PHP Combos. Then, I run composer install
and run the tests with cd dev/tests/static && php ./../../../vendor/bin/phpunit . testsuite/Magento/Test/Legacy testsuite/Magento/Test/Integrity
.
I am not entirely sure what Tests run in Magento. When I look at this I see several static test suites. Digging deeper into the test results from Static tests for CE
I can see the Allure Report, but it only mentions Integrity tests.
My latest version: https://github.com/DavidLambauer/mageos-magento2/actions/runs/3414702008/jobs/5682998132
Summary of what was done so far:
graycoreio/github-actions-magento2/supported-version@main
. https://github.com/DavidLambauer/mageos-magento2/actions
dev/tests/unit
dev/tests/integration/testsuite/Magento/Test/Integrity
dev/tests/static/testsuite/Magento/Test/Legacy
dev/tests/static
I have a couple of open todos and questions:
phpunit.xml
rulesets. I tried reverse engineering the bin/magento dev:tests:run ...
command and ended up with an execution that ignores the rulesets. phpmd
, phpstan
, Copy/Paste Detector
, etc...
We should do this for two separate things:
These actions should be added here: https://github.com/graycoreio/github-actions-magento2
I would expect to see a failure (or a success in Github) that looks like: