mage-os / mageos-magento2

Work in progress.
Open Software License 3.0
208 stars 41 forks source link

Write a Github Action that runs the static analysis tests as described in the https://developer.adobe.com/commerce/testing/guide/static/ #4

Open damienwebdev opened 1 year ago

damienwebdev commented 1 year ago

We should do this for two separate things:

These actions should be added here: https://github.com/graycoreio/github-actions-magento2

  1. The current version in v2.4-develop
  2. The v2.4.5-p1 release

I would expect to see a failure (or a success in Github) that looks like:

Image

damienwebdev commented 1 year ago

Assigning @DavidLambauer

DavidLambauer commented 1 year ago

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?

damienwebdev commented 1 year ago

@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.

DavidLambauer commented 1 year ago

I started working on this one. Doing some notes-taking here. Don't mind it, yet.

CleanShot 2022-11-07 at 20 13 44

DavidLambauer commented 1 year ago

The env variables for graycoreio/github-actions-magento2/setup-magento@main are a little bit confusing. In particular:

DavidLambauer commented 1 year ago

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

DavidLambauer commented 1 year ago

Summary of what was done so far:

I have a couple of open todos and questions: