GitHub Actions integration
  • 04 Oct 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light

GitHub Actions integration

  • Dark
    Light

Autify provides the official GitHub Actions to upload a build and run a test plan easily from your GitHub Actions workflow.

Getting started

This document describes how to use our GitHub Actions integrations with your GitHub repository step-by-step.

Prerequisites

First, we assume you already have GitHub Actions workflow to build your application. We'll add an Autify test step right after the build step to confirm the newly built application doesn't break the end-to-end experience.

Secondly, you need to create a test plan on Autify for Mobile. Please note the URL of your test plan e.g. https://mobile-app.autify.com/projects/AAA/test_plans/BBB and we'll use it later.

You also need to create a personal access token of Autify for Mobile. Please note the generated token somewhere so that we can store the value on GitHub Actions Secrets later.

Note: Since the personal access token is associated with a single user, we recommend you to create a machine user in your organization and use its personal access token for CI/CD integration.

Store personal access token on GitHub Actions Secrets

Store the personal access token you generated above on Secrets by following GitHub's document. You can use an arbitrary name for the Secrets but that name will be referred by your GitHub Actions definition later. Assuming you named it AUTIFY_MOBILE_ACCESS_TOKEN here.

Add GitHub Actions step to upload a build and run Autify for Mobile

Finally, let's add a new step to your existing GitHub Actions workflow. See the examples below. The autify-test-url value should be the URL you noted above.


Upload a new build file and start a test (no waiting for the finish of the test):

- uses: autifyhq/actions-mobile-test-run@v2
  with:
    access-token: ${{ secrets.AUTIFY_MOBILE_ACCESS_TOKEN }}
    autify-test-url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB
    build-path: /path/to/your-[ios.app|android.apk]

If you want to wait until the test finishes or timed out:

- uses: autifyhq/actions-mobile-test-run@v2
  with:
    access-token: ${{ secrets.AUTIFY_MOBILE_ACCESS_TOKEN }}
    autify-test-url: https://mobile-app.autify.com/projects/AAA/test_plans/BBB
    build-path: /path/to/your-[ios.app|android.apk]
    wait: true
    timeout: 300

CAVEAT: This will consume your GitHub Actions hosted runner's minutes while waiting. Be careful when extending the timeout value.

Just upload a new build file (workspace-id is the id right after /projects/ in the URL you noted above):

- uses: autifyhq/actions-mobile-build-upload@v2
  with:
    access-token: ${{ secrets.AUTIFY_MOBILE_ACCESS_TOKEN }}
    workspace-id: AAA
    build-path: /path/to/your-[ios.app|android.apk]

Conclusion

By using Autify's GitHub Actions, you can automatically run a test plan after build so that you can detect regressions right away and take an appropriate actions without wasting time.


Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.