OwnTracks Android uses Github Actions to build, test and release.
Assembles the debug and release variants of both GMS and OSS flavours. Also compiles the test sources, then runs the unit tests (with coverage) and the Android lint.
Runs the F-Droid server scanner against the OSS Release APK to make sure that no non-free components snuk into the release.
Runs the espresso tests. Can be parameterized over which flavour to run (OSS/GMS), parallelism, the Android API version of the emulator to use, and a flag to indicate that only tests annotated @SmokeTest
should be run. Coverage report uploaded to codecov.io if the smoketest flag is not set
Uploads the release bundle of the GMS flavour to the Google Play Store internal testing track.
Three main workflows:
build-integration-test-publish
runs thebuild-release
,fdoird-scanner
,unit-test
,lint
,ui-tests
(matrixed across oss/gms flavours) andpublish-to-play-store
jobs. Triggered on every commit tomaster
that changes the source.smoke-test
runs theunit-test
andui-tests
jobs just on thegms
flavour an flagging that only@SmokeTest
tests should be run. Triggered when thesmoke-test-required
label is added to a PR.integration-test
runs theunit-test
andui-tests
jobs on bothgms
andoss
flavours across all test cases.
There's 3 GHA workflows that help manage PRs and releases.
Triggered by a version tag, this workflow creates a Github Release, fetches the APKs from the corresponding CircleCI workflow and attaches them to the release, and finally promotes the Play Store build between either internal and beta, beta and production or internal and production (depending on whether it's a beta tag or not).
Labels new PRs with the approprate test required label depending on what's changed.
Forked PRs can't trigger workflows on CircleCI because that requires an API key stored in a Github secret. Github secrets aren't exposed to pull_request
flows running on forked branches, so the workaround is to review the forked PR and then push those to a separate branch on the main repo using the git-push-fork-to-upstream-branch
script. This can then trigger a CI test run on CircleCI depending on the branch pushed to. Commits pushed to trigger-smoke-test
will trigger a smoketest run, and trigger-integration-test
will trigger a full integration test. On completion, Circle should post the result status to GH for that commit, which should update the status on the forked PR.