amethyst/.github/workflows/build.yml

55 wiersze
1.2 KiB
YAML
Czysty Zwykły widok Historia

2023-01-11 20:06:02 +00:00
name: Test/Build Android
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
2023-04-19 15:24:49 +00:00
- name: Set up JDK 17
2023-01-11 20:06:02 +00:00
uses: actions/setup-java@v1
with:
2023-04-19 15:24:49 +00:00
java-version: 17
2023-01-11 20:06:02 +00:00
- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
2023-03-07 18:09:26 +00:00
- name: Linter (gradle)
2024-01-06 15:44:05 +00:00
run: ./gradlew spotlessCheck
2023-03-07 18:09:26 +00:00
2023-01-11 20:06:02 +00:00
- 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 --no-daemon
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: Debug APK
path: app/build/outputs/apk/debug/app-debug.apk
- name: Upload Test Results
uses: actions/upload-artifact@v2
with:
name: Build Reports
path: app/build/reports