githubEdit

GitHub Actions

The DeviceCloud GitHub Action is a drop-in replacement for the Maestro Cloud Actionarrow-up-right. The inputs are identical where practical, so switching is straightforward.

Quick Start

- uses: devicecloud-dev/device-cloud-for-maestro@v2
  with:
    api-key: ${{ secrets.DCD_API_KEY }}
    app-file: <path_to_your_app_file>

Store your API key as a GitHub Actions secretarrow-up-right named DCD_API_KEY. You can find your API key in the console settingsarrow-up-right.

Trigger Recommendations

Trigger tests on pushes to your main branch and on pull requests:

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
circle-info

If you use pull_request_target to run tests from forked PRs, explicitly check out the PR HEAD to ensure you're testing the changed code.

on:
  push:
    branches: [main]
  pull_request_target:
    branches: [main]
jobs:
  run-maestro-on-dcd:
    name: Run Flows on DeviceCloud
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          ref: ${{ github.event.pull_request.head.sha }}

Platform Examples

Android

app-file accepts a path or a glob pattern. When using a glob, the first matched file is used.

iOS

app-file must point to an Apple silicon compatible Simulator .app build, or a zipped .zip bundle. Glob patterns are supported; the first match is used.


Inputs Reference

Authentication

Input
Required
Description

api-key

Yes

Your DeviceCloud API key. Can also be set via the DEVICE_CLOUD_API_KEY environment variable.

App Configuration

Input
Required
Default
Description

app-file

No*

Path or glob to the app binary (APK or .app/.zip). *Either app-file or app-binary-id is required.

app-binary-id

No*

ID of a previously uploaded app binary. Skips the upload step.

additional-app-files

No

Multiline list of additional binary paths to install before the test.

additional-app-binary-ids

No

Multiline list of additional previously-uploaded binary IDs.

ignore-sha-check

No

false

Skip the SHA hash check that prevents duplicate uploads. Not recommended.

Flow Selection

Input
Required
Default
Description

flows

No

./.maestro/

Path to a flow file or folder containing flows. Alias: workspace. flows takes precedence if both are set.

workspace

No

./.maestro/

Alias for flows.

exclude-flows

No

Subdirectories to exclude when building the flow list.

include-tags

No

Only run flows with these Maestro tags (comma-separated).

exclude-tags

No

Exclude flows with these Maestro tags (comma-separated).

config

No

config.yaml in workspace

Path to a custom Maestro config file.

Device Configuration

Input
Required
Default
Description

android-device

No

Android device model. Options: pixel-6, pixel-6-pro, pixel-7, pixel-7-pro, generic-tablet.

android-api-level

No

34

Android API level. Options: 29, 30, 31, 32, 33, 34, 35, 36.

ios-device

No

iOS device model. Options: iphone-14, iphone-14-pro, iphone-15, iphone-15-pro, iphone-16, iphone-16-plus, iphone-16-pro, iphone-16-pro-max, ipad-pro-6th-gen.

ios-version

No

17

Major iOS version. Options: 16, 17, 18, 26.

device-locale

No

Device locale in ISO-639-1_ISO-3166-1 format (e.g. de_DE). See Device Locale.

orientation

No

0

Android only. Device orientation in degrees. Options: 0, 90, 180, 270.

google-play

No

false

Android only. Run flows against Google Play devices.

runner-type

No

default

Runner type. Options: default, m1, m4. Non-default runners incur premium pricing. See Runner Types.

See the Devices & OS Versions page for the full availability matrix.

Test Configuration

Input
Required
Default
Description

maestro-version

No

Maestro CLI version to run flows with. See Maestro Versions.

env

No

Multiline list of environment variables (KEY=value) to inject into flows.

name

No

Commit message

Custom name for this test run, visible in the console.

retry

No

0

Number of retries on failure (max 3). Retries are free — same as pressing retry in the UI.

report

No

Report format. Options: junit, html, html-detailed, allure. See Report Formats.

Android-Specific Options

Input
Required
Default
Description

maestro-chrome-onboarding

No

false

Force Maestro-based Chrome onboarding. Fixes browser-related crashes but slows tests. See Chrome Onboarding.

android-no-snapshot

No

false

Force cold boot instead of snapshot boot. Automatically enabled for API level 35+.

enable-animations

No

false

Keep device animations enabled during tests. By default animations are disabled to reduce CPU load.

Execution Options

Input
Required
Default
Description

async

No

false

Exit immediately without waiting for results. Returns exit code 0 regardless of test outcome. See Async Execution.

quiet

No

false

Reduce console output. Useful in verbose CI environments.

download-artifacts

No

Download logs, screenshots, and videos after the run. Options: ALL, FAILED.

json-file

No

false

Write test results to a JSON file (<run_name>_dcd.json or <upload_id>_dcd.json).

debug

No

false

Enable verbose debug output.

use-beta

No

false

Use the beta version of the DCD CLI.


Outputs Reference

Add an id to the step to reference its outputs in later steps:

Output
Description

DEVICE_CLOUD_CONSOLE_URL

URL to view the test results in the DeviceCloud console.

DEVICE_CLOUD_FLOW_RESULTS

JSON array with results for each flow: [{ "name": "...", "status": "PASSED" }].

DEVICE_CLOUD_UPLOAD_STATUS

Overall status of the test run: PENDING, RUNNING, PASSED, FAILED, or CANCELLED.

DEVICE_CLOUD_APP_BINARY_ID

ID of the uploaded app binary. Reuse this in subsequent jobs to skip re-uploading.


Using Outputs

Post results to Slack

Save results as a workflow artifact

Reuse the uploaded binary in a later job


Common Patterns

Run async tests (non-blocking)

Use async: true to start tests without blocking your pipeline. Then use dcd status to check results separately.

Filter tests by tag

Pass secrets to flows

Save JSON results file

This creates my-run_dcd.json:


Migrating from Maestro Cloud

Switch in one line — replace the uses value:

All other inputs are compatible. The only change needed (beyond the uses line) is updating your secret name from MCLOUD_API_KEY to DCD_API_KEY (or whatever name you choose when storing your DeviceCloud API key).

Last updated