-
Notifications
You must be signed in to change notification settings - Fork 132
MQE-2047: Jenkins Pipeline - Static Check Options #697
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
Conversation
- added ruleset reading functionality to static-checks command - added example staticRuleset.json to framework.
- Fixed project root
-Fixed to use TESTS_BP, should be good now.
- Added docs - Fixed static check errors
- Added proper static checks to sample file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments.
Couldn't find static check error output files in build http://10.234.156.139:8080/job/Functional-Tests-CE/3200/console. Is it because the build failed?
src/Magento/FunctionalTestingFramework/Console/StaticChecksCommand.php
Outdated
Show resolved
Hide resolved
*/ | ||
private function parseRulesetJson() | ||
{ | ||
$pathToRuleset = TESTS_BP . DIRECTORY_SEPARATOR . "staticRuleset.json"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should the file staticRuleset.json
even be added to MFTF? Because, again updates to this file will need a new MFTF version. Reading from this path works for both standalone and embedded -
const DEV_TESTS_DIR = 'dev/tests/acceptance/';
$devTestsPath = FilePathFormatter::format(MAGENTO_BP) . self::DEV_TESTS_DIR;
$pathToRuleset = $devTestsPath . DIRECTORY_SEPARATOR . "staticRuleset.json";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See other comment, TESTS_BP is set as following:
- If we detect we are attached to Magento (either by composer or MAGENTO_BP), it's
dev/tests/acceptance
- If we are not attached, it's just
dev/
to point towards MFTF standalonedev directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in standalone mode, with latest code, it tries to read staticRuleSet.json
from mftf's \dev
, doesn't find it, and executes all static checks instead. Shouldn't standalone also read from attached magento's dev/tests/acceptance
?
However in case mftf is not attached at all i.e MAGENTO_BP is not set in .env
, it again tries to read file from mftf's \dev
, doesn't find it and executes all static checks, which seems correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I understand better now, let me try and reproduce scenario 1.
- CR Fixes
- CR Fixes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Description
staticRuleset.json
under witherdev/tests/acceptance
ordev
in case of embedded/standalone respectively.Contribution checklist