-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore: Cache node installed via nvm on Bitrise #12271
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
|
Cal-L
commented
Nov 13, 2024
Cal-L
commented
Nov 13, 2024
tommasini
approved these changes
Nov 14, 2024
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!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
No QA Needed
Apply this label when your PR does not need any QA effort.
release-7.36.0
Issue or pull request that will be included in release 7.36.0
team-mobile-platform
Mobile Platform team
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds steps to the
prep_environment
workflow for both restoring and saving the installed version of node. First, we attempt to restore the cached node file path. Then the install nvm step will attempt to install node if it doesn't exist. If it does, it will use the cached version of node. Then, we cache the downloaded version of node (if there is one)At the time of writing, node is installed to the following paths
/Users/vagrant/.nvm
/root/.nvm
Related issues
Fixes: https://github.com/MetaMask/mobile-planning/issues/2029
Manual testing steps
pr_smoke_e2e_pipeline
Restore Node
step inprep_environment
workflow should not have any node to cacheSave Node
step will then cache nodepr_smoke_e2e_pipeline
again,Restore Node
will now be able to restore the cached version of nodeScreenshots/Recordings
Before
After
Build with node cache enabled - https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/6598b4fb-e88a-4252-9d57-5e8421226ea5?tab=workflows
In this build, both
ios_e2e_build
andandroid_e2e_build
does not yet have node cached, so it downloads it on the respective machines and then caches it. For E2E tests - The restore node step successfully detects that node already exists via nvm and uses that instead of downloading it againPre-merge author checklist
Pre-merge reviewer checklist