Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
play-circle

GitHub Action

Run tests using Marathon Cloud

1.0.0

Run tests using Marathon Cloud

play-circle

Run tests using Marathon Cloud

Run tests using Marathon Cloud

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run tests using Marathon Cloud

uses: MarathonLabs/action-test@1.0.0

Learn more about this action in MarathonLabs/action-test

Choose a version

Marathon Cloud GitHub Action

With this action you can easily run your Android instrumentation tests.

Marathon Cloud is designed to run all your automated tests in just 15 minutes, no matter how many tests you have.

Quick example

A really basic example building an app apk, test apk and running tests:

name: Run tests
on: push
jobs:
  run-tests:
    runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v4
    - name: Build app
      run: ./gradlew assembleDebug assembleAndroidTest
    - name: Run tests
      uses: MarathonLabs/action-test@1
      with:
        apiKey: ${{ secrets.MARATHON_CLOUD_API_TOKEN }}
        application: app/build/outputs/apk/debug/app-debug.apk
        testApplication: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
        platform: android
        output: "./results"
        version: "1.0.1"

Inputs

Name Description Default Example
apiKey (required) Marathon Cloud API key cafebabe
version (required) marathon-cloud cli version to use 1.0.0
application (required) Application binary path.
Android: application should point to the APK file.
iOS: application should point to an ARM compatible Simulator build packaged in an ipa format or a zip archive.
Android: app/build/outputs/apk/debug/app-debug.apk
iOS: /home/user/workspace/sample.zip or /home/user/workspace/sample.ipa
testApplication (required) Test application binary path.
Android: test_application should point to the test .apk file for your app.
iOS: test_application should point to an ARM compatible iOS Test Runner app packaged in an ipa format or a zip archive.
Android: app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
iOS: /home/user/workspace/sampleUITests-Runner.zip or /home/user/workspace/sampleUITests-Runner.ipa
platform (required) Testing platform android or ios
osVersion (optional) Android or iOS OS version 11, 15.5, etc.
systemImage (optional) OS-specific system image. For Android one of [default,google_apis]. For iOS only [default] default, google_apis
output (optional) Output folder path output
link (optional) Link to commit
flavor (optional) Type of tests to run native native, js-test-appium, python-robotframework-appium
filterFile (optional) File containing test filters in YAML format, following the schema described at https://docs.marathonlabs.io/runner/configuration/filtering/#filtering-logic. For iOS see also https://docs.marathonlabs.io/runner/next/ios#test-plans.
wait (optional) Wait for test run to finish if true, exits after triggering a run if false. Defaults to true true

marathon-cloud version

For action version 0 the latest supported version is 0.3.11. Any version starting with 1.0.0 will require action version 1 to work.

Support matrix:

action version cli version supported latest version
1 1.0.0<=..<2.0.0 not supported
0 <1.0.0 0.3.11

Developing

The action source is located at /src. The action is written in TypeScript and compiled to a single javascript file with ncc. It's expected to checkin lib/index.js to the repository.

To setup the development environment, run the following commands:

$ npm install

To build the action script, run the following command:

$ npm run build

To test the action, we can use the workflow Test workflow to trigger a build.

LICENSE

MIT