-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ci: 8253 - Add fitness function action for enzyme imports #8789
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8789 +/- ##
=======================================
Coverage 41.60% 41.60%
=======================================
Files 1269 1269
Lines 30859 30859
Branches 3082 3082
=======================================
Hits 12840 12840
Misses 17243 17243
Partials 776 776 ☔ View full report in Codecov by Sentry. |
…to ci/8253-fitness-function-for-enzyme-import
188ef55
to
2cfc0d8
Compare
Quality Gate passedIssues Measures |
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 to me.
In a future iteration I wish we could have these externalised in a GH action though.
Description
These changes introduces a fitness function in the form of a Github action. Currently, it is only used to prevent any new enzyme imports but can be extended to check for other things moving forward. Mostly copied over from extension:
https://github.com/MetaMask/metamask-extension/blob/develop/.github/workflows/fitness-functions.yml
https://github.com/MetaMask/metamask-extension/blob/develop/development/fitness-functions/index.ts
https://github.com/MetaMask/metamask-extension/blob/develop/development/fitness-functions/rules/sinon-assert-syntax.ts
Credits to @pedronfigueiredo
TODO: Follow up with team to identify where GH action READMEs belong
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pass without new enzyme usage
https://github.com/MetaMask/metamask-mobile/assets/10508597/b62eccd1-dc7b-4e01-8a88-73240fea77cb
Fail with new enzyme import
https://github.com/MetaMask/metamask-mobile/assets/10508597/063d6acb-b48f-4ae7-964c-922e8c931fff
Pre-merge author checklist
Pre-merge reviewer checklist