@radhya/mach 1.9.8 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +33 -16
  2. package/dist/index.js +168 -150
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -56,20 +56,30 @@ Mach's E2E testing layer is being implemented to run Maestro without requiring M
56
56
  mach build android --profile e2e-test --maestro
57
57
  mach maestro --latest --platform android --profile e2e-test
58
58
  mach maestro --build-id <buildId>
59
+ mach maestro --local --build-id <buildId>
60
+ mach maestro --build-id <buildId> --maestro-use-build-source
61
+ mach maestro --build-id <buildId> --wait
59
62
  ```
60
63
 
61
64
  Mach manages the test execution infrastructure for you, so projects do not need a separate Maestro Cloud setup.
62
- Managed Android Maestro runs need an APK artifact and a `.maestro` flow file or directory in the build source zip. Add the flows before creating the build so the runner can download `builds/<buildId>/source.zip` and execute them.
65
+ Managed Android Maestro runs need an APK artifact and a `.maestro` flow file or directory. By default, `mach maestro --maestro-flows .maestro` uploads the local flow folder for that run when the path exists in the current project. If the local path is not present, Mach falls back to the build source snapshot.
66
+ Managed Android runners use emulators, so the tested APK must include `x86_64`. Mach automatically includes emulator ABI support when you build with `--maestro`, when the profile name looks like `maestro`/`e2e`/`test`, or when the build profile sets `"android": { "emulator": true }`.
67
+ Use `mach maestro --local` to run the same flows on your connected local emulator/device. With `--build-id`, Mach downloads and installs the build artifact first; without a build or artifact flag, it runs against the app already installed locally.
63
68
 
64
69
  Useful options:
65
70
 
66
- | Flag | Description |
67
- | -------------------------- | ------------------------------------------------------------ |
68
- | `--maestro` | Queue tests automatically after a successful `mach build` |
69
- | `--maestro-flows <path>` | Flow file or directory, defaults to `.maestro` |
70
- | `--maestro-device <name>` | Managed runner device profile, defaults to Android Pixel 6 |
71
- | `--maestro-retries <n>` | Retry count for failed runs, from 0 to 10 |
72
- | `--maestro-record` | Enable recording when supported by the runner |
71
+ | Flag | Description |
72
+ | --------------------------- | ------------------------------------------------------------- |
73
+ | `--maestro` | Queue tests automatically after a successful `mach build` |
74
+ | `--maestro-flows <path>` | Flow file or directory, defaults to `.maestro` |
75
+ | `--maestro-device <name>` | Managed runner device profile, defaults to Android Pixel 6 |
76
+ | `--maestro-retries <n>` | Retry count for failed runs, from 0 to 10 |
77
+ | `--maestro-record` | Enable recording when supported by the runner |
78
+ | `--maestro-use-build-source` | Use flows from the build source snapshot instead of local upload |
79
+ | `--local` | Run `maestro test` locally instead of queueing a cloud runner |
80
+ | `--wait` | Wait for managed tests and exit non-zero if the run fails |
81
+ | `--wait-timeout <minutes>` | Maximum time to wait for a managed run, defaults to 60 |
82
+ | `--wait-interval <seconds>` | Polling interval for `--wait`, defaults to 15 |
73
83
 
74
84
  ## Cloud Builds
75
85
 
@@ -118,6 +128,7 @@ mach agent uninstall
118
128
  | `--dry-run` | Generate build script without running it |
119
129
  | `--simulator` | iOS Simulator build (no signing needed) |
120
130
  | `--auto-version` | Force Android versionCode or iOS buildNumber lookup from the store |
131
+ | `--auto-submit` | Submit the successful build to App Store Connect or Google Play |
121
132
  | `--verbose` | Enable detailed build logging |
122
133
  | `--json-output` | Write build metadata (`buildId`, Dashboard URL, status) to a JSON file for CI/CD |
123
134
 
@@ -296,18 +307,20 @@ Create a `mach.config.json` in your project root:
296
307
  | `ios.ascAppId` | App Store Connect app id. Optional when Mach can find the app by bundle ID; recommended for reliable iOS buildNumber lookup |
297
308
  | `ios.buildNumber` | Set to `"auto"` to let Mach resolve the next iOS CFBundleVersion from App Store Connect and seed the server-side build counter |
298
309
  | `android.package` | Android package name used for signing, Google Play lookup, and submit |
299
- | `android.versionCode` | Set to `"auto"` to let store builds resolve the next versionCode via Google Play |
310
+ | `android.versionCode` | Set to `"auto"` to let store builds resolve the next versionCode via Google Play |
300
311
 
301
312
  ### Profile Properties
302
313
 
303
- | Property | Description |
304
- | ------------------------ | ---------------------------------------------------------------------------------------------- |
305
- | `extends` | Inherit settings from another profile |
306
- | `environment` | Dashboard Secret Environment to use (`development`, `staging`, `production`) |
307
- | `developmentClient` | `true` to build with `expo-dev-client` |
314
+ | Property | Description |
315
+ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- |
316
+ | `extends` | Inherit settings from another profile |
317
+ | `environment` | Dashboard Secret Environment to use (`development`, `staging`, `production`) |
318
+ | `developmentClient` | `true` to build with `expo-dev-client` |
308
319
  | `distribution` | `development` for iOS development signing, `internal` for ad-hoc/internal testing builds, or `store` for App Store / Play Store release builds |
309
- | `preBuild` / `postBuild` | Shell command or script reference to run around the build |
310
- | `envGroups` | Array of environment group names to merge into this profile |
320
+ | `android.emulator` | `true` to include Android emulator ABI support (`x86_64`) for Maestro/e2e APK builds |
321
+ | `android.architectures` | Override Android release ABIs, for example `armeabi-v7a,arm64-v8a,x86_64` |
322
+ | `preBuild` / `postBuild` | Shell command or script reference to run around the build |
323
+ | `envGroups` | Array of environment group names to merge into this profile |
311
324
 
312
325
  ### Environment Groups
313
326
 
@@ -383,6 +396,10 @@ For Android dev-client builds, Mach defaults to Gradle `assembleDebug` so the ou
383
396
  mach submit --latest --platform android --profile production
384
397
  mach submit --latest --platform ios --profile production
385
398
 
399
+ # Build and submit the exact successful build in one command
400
+ mach build --platform ios --profile production --auto-submit
401
+ mach build --platform android --profile production --auto-submit --submit-track internal
402
+
386
403
  # Android track and release status can be supplied on the command or in mach.config.json
387
404
  mach submit --latest --platform android --profile production --track internal --release-status completed
388
405