eas-cli
eas-cli copied to clipboard
[ENG-6238][eas-cli] Add `eas build:run` command and implement running iOS simulator builds directly from EAS CLI
Checklist
- [ ] I've added an entry to CHANGELOG.md if necessary. You can comment this pull request with
/changelog-entry [breaking-change|new-feature|bug-fix|chore] [message]
and CHANGELOG.md will be updated automatically.
Why
https://linear.app/expo/issue/ENG-6238/add-option-to-automatically-download-and-run-ios-simulator-build
Solves 1/2 of https://github.com/expo/eas-cli/issues/572
How
Add a new eas build:run
command which allows you to run EAS Build (and not only EAS Build) simulator builds directly on your simulator without visiting our website and manually downloading and installing the app.
In this PR I only added the command and its iOS implementation.
Still needs to work on the error handling on iOS and Android implementation. Android implementation will be done in a separate PR.
Demo:
https://user-images.githubusercontent.com/55145344/196170705-f4697bd0-468b-481f-9208-cf96e7cdddcb.mov
Some parts of this code reuse the logic implemented in expo-cli.
Potential improvements which should be implemented (not necessarily as a part of this PR)
- Setting and caching default simulator ID.
- Caching simulator builds, so we don't download them every single time we run the command.
- Reuse this logic in
eas build
command - ask the user if they want to automatically run their sim build once it is completed
Test Plan
Test manually
Release plan
This shouldn't be visible to the users until we polish the user experience and add Android implementation
ENG-6238 Add option to automatically download and run iOS simulator build
- Prompt to install after a simulator build job is completed, when the developer waits for the job to complete in interactive mode
- Introduce a new command to list simulator builds (with pagination) and prompt the developer to select a build from this list. Install and run the selected build.
Size Change: +18.6 kB (0%)
Total Size: 41.2 MB
Filename | Size | Change |
---|---|---|
./packages/eas-cli/dist/eas-linux-x64.tar.gz |
41.2 MB | +18.6 kB (0%) |
Codecov Report
Merging #1447 (f954e34) into main (b9c505b) will decrease coverage by
0.75%
. The diff coverage is23.06%
.
:exclamation: Current head f954e34 differs from pull request most recent head dc5e54b. Consider uploading reports for the commit dc5e54b to get more accurate results
@@ Coverage Diff @@
## main #1447 +/- ##
==========================================
- Coverage 51.80% 51.06% -0.74%
==========================================
Files 435 446 +11
Lines 14973 15373 +400
Branches 2951 3023 +72
==========================================
+ Hits 7756 7849 +93
- Misses 7204 7511 +307
Partials 13 13
Impacted Files | Coverage Δ | |
---|---|---|
packages/eas-cli/src/commandUtils/pagination.ts | 28.58% <ø> (ø) |
|
packages/eas-cli/src/graphql/generated.ts | 100.00% <ø> (ø) |
|
packages/eas-cli/src/graphql/types/Build.ts | 100.00% <ø> (ø) |
|
packages/eas-cli/src/run/ios/simulator.ts | 16.31% <16.31%> (ø) |
|
packages/eas-cli/src/run/ios/xcrun.ts | 17.50% <17.50%> (ø) |
|
packages/eas-cli/src/utils/download.ts | 18.99% <18.99%> (ø) |
|
packages/eas-cli/src/run/ios/systemRequirements.ts | 20.00% <20.00%> (ø) |
|
packages/eas-cli/src/build/queries.ts | 27.91% <23.53%> (-2.86%) |
:arrow_down: |
packages/eas-cli/src/utils/buildDistribution.ts | 25.00% <25.00%> (ø) |
|
packages/eas-cli/src/commands/build/run.ts | 27.54% <27.54%> (ø) |
|
... and 6 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
This is still WIP and I want to improve some things, but I think it might be valuable to get the review at this point 🙂
This looks good overall.
/changelog-entry new-feature Add eas build:run
command which runs iOS simulator builds from the CLI