meshtastic-android/.github/workflows/android.yml

38 wiersze
1.1 KiB
YAML

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-18.04
steps:
- uses: actions/checkout@master
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
- name: Loading secrets
env:
gservices: ${{ secrets.gservices }}
mapboxtoken: ${{ secrets.mapboxtoken }}
run: |
echo $gservices > ./app/google-services.json
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 JDK 1.8
uses: actions/setup-java@master
with:
java-version: 1.8
- name: Build java code
run: bash ./gradlew build
- name: Unit tests
run: bash ./gradlew test --stacktrace