-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
feat: improved way to trigger mmi e2e tests #27932
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. |
Builds ready [fee43b2]
Page Load Metrics (2103 ± 212 ms)
Bundle size diffs
|
Builds ready [c135693]
Page Load Metrics (2101 ± 169 ms)
Bundle size diffs
|
Builds ready [fb05163]
Page Load Metrics (2115 ± 103 ms)
Bundle size diffs
|
Builds ready [faf540d]
Page Load Metrics (1911 ± 89 ms)
Bundle size diffs
|
@Gudahtt could you change the |
.circleci/config.yml
Outdated
- run: | ||
name: Check for MMI Team Label or Reviewer | ||
command: | | ||
chmod +x .circleci/scripts/check_mmi_trigger.sh |
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.
The file permissions are checked into the repository; you don't need to make it executable every run, you can make it executable once and commit it.
@albertolive Thanks for the ping. I have removed |
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.
Mostly looks good! We can remove the chmod +x
step, and we still need to better handle PRs from forks
- Update check_mmi_trigger.sh to skip tests for forks without failing - Remove redundant chmod from CircleCI config
@Gudahtt Thank you for your comments. I’ve updated the files accordingly. Regarding the tests not being mandatory, let's reconsider. Over the last few months, we’ve significantly improved the flaky tests, and making them mandatory would ensure greater confidence that nothing breaks moving forward. 🙏 |
Builds ready [e262903]
Page Load Metrics (1935 ± 88 ms)
Bundle size diffs
|
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.
LGTM!
Description
Summary
This pull request introduces a conditional check in the CircleCI pipeline to determine whether MMI Playwright tests should be executed based on the presence of the
team-mmi
label or if a reviewer from theMetaMask/mmi
team has been assigned to the pull request. This optimizes the CI workflow by running MMI-specific tests only when necessary.Previously, the end-to-end tests were only triggered when the
team-mmi
label was added to a pull request. However, in practice, no one outside of our team was adding this label, which resulted in the end-to-end MMI tests never being executed.We already have an automation in place to automatically add a reviewer from the
MetaMask/mmi
team when relevant pull requests are opened. This pull request leverages that automation to ensure that the MMI tests are automatically triggered when a reviewer is assigned, making the process more efficient and reducing manual steps.Changes Implemented
check-mmi-trigger
step that runs a shell script to check if the pull request has either:team-mmi
label.MetaMask/mmi
team assigned.prep-build-test-mmi-playwright
andtest-e2e-mmi-playwright
steps are now conditionally executed based on the result of thecheck-mmi-trigger
step.check-mmi-trigger
step, improving pipeline efficiency by avoiding unnecessary test execution.team-mmi
label or theMetaMask/mmi
reviewer in a pull request.run_mmi_tests
environment variable to true or false depending on the conditions, which controls whether the MMI tests will proceed.Benefits
Related issues
Fixes:
Manual testing steps
check-mmi-trigger
step is evaluated correctly and logs the expected conditions met or skipped.prep-build-test-mmi-playwright
andtest-e2e-mmi-playwright
steps run successfully.Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist