forked from meshtastic/Meshtastic-Android
-
Notifications
You must be signed in to change notification settings - Fork 7
42 lines (38 loc) · 1.39 KB
/
android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Android CI
# from https://medium.com/@wkrzywiec/github-actions-for-android-first-approach-f616c24aa0f9
on:
- push
- pull_request
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Loading secrets
env:
gservices: ${{ secrets.gservices }}
mapboxtoken: ${{ secrets.mapboxtoken }}
run: |
# not yet needed echo $gservices > ./app/google-services.json
rm ./app/google-services.json
cp ./app/google-services-example.json ./app/google-services.json
rm ./app/src/main/res/values/mapbox-token.xml
cp ./app/special/mapbox-token.xml ./app/src/main/res/values/
# The following would not be valid XML, don't use yet
# echo $mapboxtoken > ./app/src/main/res/values/mapbox-token.xml
mkdir -p ~/.gradle
echo "MAPBOX_DOWNLOADS_TOKEN=$mapboxtoken" >>~/.gradle/gradle.properties
- name: Mock curfirmware version for CI
run: |
rm ./app/src/main/res/values/curfirmwareversion.xml
cp ./app/special/curfirmwareversion.xml ./app/src/main/res/values/
- name: set up Java
uses: actions/setup-java@v2
with:
distribution: "adopt"
java-version: 16
- name: Unit tests
run: bash ./gradlew test --stacktrace