mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 12:17:50 +01:00
84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
name: Test/Build Android
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: 21
|
|
|
|
- name: Cache gradle
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Linter (gradle)
|
|
run: ./gradlew spotlessCheck
|
|
|
|
- name: Test (gradle)
|
|
run: ./gradlew test --no-daemon
|
|
|
|
- name: Android Test Report
|
|
uses: asadmansr/android-test-report-action@v1.2.0
|
|
if: ${{ always() }} # IMPORTANT: run Android Test Report regardless
|
|
|
|
- name: Build APK (gradle)
|
|
run: ./gradlew assembleDebug
|
|
|
|
- name: Upload Play APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Play Debug APK
|
|
path: amethyst/build/outputs/apk/play/debug/amethyst-play-universal-debug.apk
|
|
|
|
- name: Upload FDroid APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: FDroid Debug APK
|
|
path: amethyst/build/outputs/apk/fdroid/debug/amethyst-fdroid-universal-debug.apk
|
|
|
|
- name: Build APK (gradle)
|
|
run: ./gradlew assembleBenchmark
|
|
|
|
- name: Upload Play APK Benchmark
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Play Benchmark APK
|
|
path: amethyst/build/outputs/apk/play/benchmark/amethyst-play-universal-benchmark.apk
|
|
|
|
- name: Upload FDroid APK Benchmark
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: FDroid Benchmark APK
|
|
path: amethyst/build/outputs/apk/fdroid/benchmark/amethyst-fdroid-universal-benchmark.apk
|
|
|
|
- name: Upload Compose Reports
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Compose Reports
|
|
path: amethyst/build/compose_compiler
|
|
|
|
- name: Upload Test Results
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Test Reports
|
|
path: amethyst/build/reports
|
|
|