GitHub provides basic documentation on how actions/workflows work and how to create them.
-
Create new workflow using visual editor or manually in file
.github/main.workflow
. -
Define build steps (aka Actions) of the workflow and dependencies between them (see Creating a new GitHub Action).
-
For this Android project, special actions were created:
See these projects'
README
andDockerfile
files for configuration details.Use
vgaidarji/android-github-actions/build@v1.0.0
for regular build steps and provide commands via actionargs
parameter. For example:args = "./gradlew assembleDebug"
. This will be passed toentrypoint.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.
-
Add
COVERALLS_REPO_TOKEN
,FABRIC_API_KEY
,FABRIC_API_TOKEN
secrets via Actions UI editorOnce 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"]
-
Project will be built on every
push
action (both from branches and PR's)