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

0.3.2

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/[email protected]

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@v3
    - name: Build app
      run: ./gradlew assembleDebug assembleAndroidTest
    - name: Run tests
      uses: MarathonLabs/[email protected]
      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
        githubToken: ${{ secrets.GITHUB_TOKEN }}

Inputs

Name Description Default Example
apiKey (required) Marathon Cloud API key cafebabe
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
version (optional) marathon-cloud cli version to use latest 0.1.1
githubToken (optional) GitHub token ${{ secrets.GITHUB_TOKEN }}

marathon-cloud version

If the version is not set, or is one of latest or *, the action will try to use the latest version of marathon-cloud. However, due to the GitHub API rate limiting settings, this action requires to pass in the GITHUB_TOKEN input. If this input variable is not set, one will see error similar to the following:

Run MarathonLabs/setup-marathon-cloud@{version}
/home/runner/work/_actions/MarathonLabs/setup-marathon-cloud/{version}/lib/index.js:14812
            throw new Error('GITHUB_TOKEN is not set, unable to resolve the latest version of marathon-cloud');

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