Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (28 sloc) 2.85 KB

GitHub Actions

Configuration

GitHub provides basic documentation on how actions/workflows work and how to create them.

Configuration details
  1. Create new workflow using visual editor or manually in file .github/main.workflow.

  2. Define build steps (aka Actions) of the workflow and dependencies between them (see Creating a new GitHub Action).

  3. For this Android project, special actions were created:

    See these projects' README and Dockerfile files for configuration details.

    Use vgaidarji/android-github-actions/build@v1.0.0 for regular build steps and provide commands via action args parameter. For example: args = "./gradlew assembleDebug -PpreDexEnable=false". This will be passed to entrypoint.sh of the appropriate GitHub Action and executed in root folder of the workspace.

    Use vgaidarji/android-github-actions/emulator@v1.0.0 for running UI tests on Android Emulator. By default, this action will execute ui-test-on-emulator script (see script sources).

    To modify the way Android UI tests are executed, you need to override /usr/bin/run-ui-tests script and provide custom way of executing UI tests. Alternatively, use another GitHub Action or Docker image. By default, UI tests will be executed via ./gradlew connectedAndroidTest command.

    See .github/man.workflow with final configuration.

  4. Add COVERALLS_REPO_TOKEN, FABRIC_API_KEY, FABRIC_API_TOKEN secrets via Actions UI editor

    Once secrets are created via editor, they will be automatically used in Action from which you initiated the secrets creation. For any other Action which needs secrets or environment variables we need to either specify them

    via visual editor

    or directly in workflow file as follows

    secrets = ["FABRIC_API_KEY", "FABRIC_API_SECRET"]
    
  5. Project will be built on every push action (both from branches and PR's)