Integration with any CI Platform
You can use the Maestro CLI to run your Flows on Maestro Cloud from any CI platform.
API Key | |
iOS | Provide a path that points to an x86-compatible *.app simulator build directory, or a zipped file that contains the *.app build. |
Android | You APK must be x86-compatible. |
Add all of your Flows under a single directory in your repo. We recommend naming this directory
.maestro/
as this is the naming convention our native integrations expect by default. (Note the "." at the beginning of .maestro/
)<root>
├── .maestro/
│ ├── Login.yaml
│ ├── Add to Cart.yaml
│ └── Search.yaml
All of the flows directly under the
.maestro/
directory will be executed by Maestro Cloud.It's common to have some Flow files that are only meant to be executed as part of another Flow via the
runFlow
command. These "subflows" can be nested under a subdirectory to prevent them from running as a top-level Flow.<root>
├── .maestro/
│ ├── subflows/
│ │ └── MySubflow.yaml
│ ├── Login.yaml
│ ├── Add to Cart.yaml
│ └── Search.yaml
In the example above,
MySubflow.yaml
will not be executed as a top-level Flow, but still can be referenced by other Flows using the runFlow
command.Maestro CLI
GitHub Actions
First, ensure that the Maestro CLI is installed on your CI machine:
curl -Ls "https://get.maestro.mobile.dev" | bash
Add a step in your CI workflow that executes the
maestro cloud
command:maestro cloud --apiKey <apiKey> <appFile> .maestro/
<apiKey> | Maestro Cloud API Key |
<appFile> | |
.maestro/ | The directory that contains your Flows |
To set a name for your upload, use the
--name
option:maestro cloud --apiKey <apiKey> --name <uploadName> <appFile> .maestro/
Add a
MAESTRO_CLOUD_API_KEY
secret to your repo (Settings -> Secrets -> Actions). Set the value to your Maestro Cloud API Key.
Add the
mobile-dev-inc/action-maestro-cloud
step to your workflow:- uses: mobile-dev-inc/action-maestro-[email protected]
with:
api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }}
app-file: <path to APK or iOS Simulator *.app build>
Note that you can also define your API key as an environment variable in your shell with the name
MAESTRO_CLOUD_API_KEY
and Maestro will automatically read it for youThe
maestro cloud
command and our native CI integrations will wait for your Flows to finish executing before returning.If any Flow failures are detected, the exit code is set to 1. On success, the exit code will be set to 0. This allows you to leverage any existing test alerting you have in place.
A link to the current upload will be printed out to your logs. You can view any ongoing or past uploads in the Maestro Cloud Console.
Last modified 16d ago