|
1 | 1 | # Continuous integration actions |
2 | 2 |
|
3 | | -This document describes the initial GitHGub actions in the repo. They're written by someone new to GitHub, so improvements are always welcome. |
| 3 | +This document describes the GitHGub actions in the repo. They're written by someone new to GitHub, so improvements are always welcome. |
4 | 4 |
|
5 | 5 | ## GitHub secrets |
| 6 | + |
| 7 | +We have a number of GitHub secrets which are used to protect the following data: |
| 8 | +* Keys used for creating release packages and accessing Google service. These prevent someone else from publishing a build that claimed to be our app. |
| 9 | +* The URL and key required to get map tiles from our protomaps server. The aim here is to prevent use of our map tile server by other apps. Our server costs are covered by charities and we simply aim to minimize their costs. |
| 10 | + |
| 11 | +More details follow on each secret here which is useful during setup. |
| 12 | + |
6 | 13 | ### Release build signing |
7 | 14 | The approach to signing in `build-app.yaml` is based on [this description](https://www.droidcon.com/2023/04/04/securely-create-android-release-using-github-actions/). |
8 | 15 |
|
@@ -33,21 +40,30 @@ The `run-test.yaml` action bumps the version number, committing the change back |
33 | 40 | * PAT_TOKEN - token generated on an admin account which allows write access to public repos. |
34 | 41 |
|
35 | 42 | ## Actions |
36 | | -`run-tests.yaml` is the action which is run on each Pull Request. It runs several layers of tests: |
| 43 | +### Run tests `run-tests.yaml` |
| 44 | +This is the action which is run on each Pull Request. It runs several layers of tests: |
37 | 45 | * Lint of the repo |
38 | 46 | * Runs unit tests |
39 | 47 | * Builds a debug release |
40 | 48 | * Runs instrumentation tests locally on an emulator |
41 | 49 |
|
42 | | -`build-app.yaml` is the action used to build a release and is manually triggered. It's steps are: |
| 50 | +Note that because of the way GitHub triggers `run-tests.yaml` it cannot use secrets. This affects tests which use the tile provider which have to be skipped when run in this way. This is straightforward to do - see callers of `tileProviderAvailable()` in the test code. |
| 51 | + |
| 52 | +### Tag and build release `build-app.yaml` |
| 53 | +This is the action used to build a release and is manually triggered from the GitHub GUI. It's steps are: |
43 | 54 | * Bump the version code and name in `app/build.gradle.kts` and commit it back to the repo with a tag containing the version number |
44 | 55 | * Obtains the `google-service.json` and `keystore.jks` from the secrets. |
45 | 56 | * Lints the repo |
46 | 57 | * Runs unit tests |
47 | 58 | * Builds a debug build APK |
48 | 59 | * Builds a release build and signs it as an APK and AAB |
49 | 60 | * Builds the instrumentation tests into an APK |
50 | | -* Uploads the artefacts |
51 | | -* Triggers a run of Firebase instrumentation tests |
| 61 | +* Uploads the artifacts |
| 62 | +* Triggers a run of Firebase instrumentation tests |
| 63 | +* Triggers a run of Firebase robo tests |
| 64 | + |
| 65 | +### Deploy docs `jekyll-gh-pages.yml` |
| 66 | +This is the action to build the GitHub Pages documentation site (including this page!). It's triggered whenever there is a changes submitted within the `/docs` directory. To work it needs GitHub Pages to be enabled on the repository and for them to be configured with the Source being GitHub Actions. |
52 | 67 |
|
53 | | -`jekyll-gh-pages.yml` is the action to build the GitHub Pages documentation site (including this page!). It's triggered whenever there is a changes submitted within the `/docs` directory. To work it needs GitHub Pages to be enabled on the repository and for them to be configured with the Source being GitHub Actions. |
| 68 | +### Nightly build and test `nightly.yaml` |
| 69 | +This is similar to the code that tags and builds a release, the main difference being is that it doesn't bump the version number and it only builds a debug version of the app. It does run the instrumentation tests locally followed by the Firebase tests on the release. |
0 commit comments