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

62 wiersze
1.3 KiB
YAML

name: Android CI
on:
push:
branches: [ master ]
paths-ignore:
- "**.md"
pull_request:
branches: [ master ]
jobs:
ci-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v3
- name: Mock files for CI
run: |
rm ./app/google-services.json
cp ./app/google-services-example.json ./app/google-services.json
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Check lint
run: ./gradlew lintFdroidDebug lintGoogleDebug
- name: Build debug artifacts
run: ./gradlew assembleDebug
- name: Run local tests
run: ./gradlew testFdroidDebug testGoogleDebug
- name: Upload debug artifact
uses: actions/upload-artifact@v4
with:
name: fdroidDebug
path: app/build/outputs/apk/fdroid/debug/app-fdroid-debug.apk
retention-days: 30
- name: Upload build reports
if: always()
uses: actions/upload-artifact@v4
with:
name: build-reports
path: app/build/reports
retention-days: 30