Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolves #4 : QA Pipeline #16

Closed
wants to merge 10 commits into from

Conversation

DavidLambauer
Copy link
Contributor

@DavidLambauer DavidLambauer commented Nov 21, 2022

This PR introduces a QA Workflow that uses a Matrix to spin up the same jobs with different parameters. Right now, the matrix is set to supported-versions, equivalent to Adobe's support lifecycle. I assume the matrix will change, but to me, it makes sense to have the option to test a PR against different variations of dependencies.

For now, the only test that runs is PHPMD. I used the Magento Ruleset. A complete run of PHPMD for all Magento Extensions takes around an hour, which is way too long. I only run PHPMD on the changed files within a PR to speed up the feedback loop. This works great for stupid tools like PHPMD and PHPCS, but it might not be possible for PHPStan, Copy/Paste Detector, or similar tools.

As the current full scan of PHPMD on Magento throws a lot of errors, I assume I messed up some parameters, or Magento works with a baseline. I haven't found one, so I assume this potential baseline is internal. We should discuss that baseline topic in a tech meeting.

The command to run PHPMD: php vendor/bin/phpmd app/code github dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml

fixes #4

@@ -56,4 +56,9 @@ public function __construct(

$this->_openActions[] = ImsCallback::ACTION_NAME;
}

private function unusedMethod()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of this method? Left over debug code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be seen so, yes. I want to execute PHPMD only on the changed files within a PR to speed up the process. To test this behavior, I need a PHPMD error :). Can be removed as soon as I've seen the result and the nightly builds run again.

@DavidLambauer DavidLambauer changed the title QA Pipeline Resolves #4: QA Pipeline Nov 21, 2022
@DavidLambauer DavidLambauer changed the title Resolves #4: QA Pipeline Resolves #4 : QA Pipeline Nov 21, 2022
@DavidLambauer DavidLambauer changed the title Resolves #4 : QA Pipeline Resolves https://github.com/mage-os/mageos-magento2/issues/4 : QA Pipeline Nov 21, 2022
@DavidLambauer DavidLambauer changed the title Resolves https://github.com/mage-os/mageos-magento2/issues/4 : QA Pipeline Resolves #4 : QA Pipeline Nov 21, 2022
@DavidLambauer DavidLambauer changed the title Resolves #4 : QA Pipeline resolves #4 : QA Pipeline Nov 21, 2022
@DavidLambauer DavidLambauer changed the title resolves #4 : QA Pipeline fixes mage-os/mageos-magento2#4 : QA Pipeline Nov 21, 2022
@DavidLambauer DavidLambauer changed the title fixes mage-os/mageos-magento2#4 : QA Pipeline resolves #4 : QA Pipeline Nov 21, 2022
Switched to bin/magento execution

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

Replaced tests:run with native phpmd

Changed Output Format to GitHub

Fixed scope

WIP - Working on Github Actions

WIP - Working on Github Actions

run only for changed files and PRs

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

wip

Changed matrix to latest

Back to currently-supported as latest doesnt work

Used a custom step to get changed files

fixed my mess

syntax

changed action for changed files

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions

WIP - Working on Github Actions
@DavidLambauer
Copy link
Contributor Author

That finally seem to work as expected for PHPMD.

CleanShot 2022-12-04 at 16 40 03

@Vinai
Copy link
Contributor

Vinai commented Oct 5, 2023

@DavidLambauer is this PR still a work-in-progress?

@DavidLambauer
Copy link
Contributor Author

Yeh, I'll work on it. As we now have the GitHub Actions Repo, I'll transfer everything to there and push an action for PHPMD

@DavidLambauer
Copy link
Contributor Author

Will move this to the github actions repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants