mirror of
https://github.com/greenart7c3/Amber.git
synced 2026-10-30 06:47:33 +00:00
Kotlin warnings are now errors, and a detektAll task checks the app (every flavor, unit and instrumented tests) and desktop for unused imports, parameters, variables and private declarations, with type resolution. Both run in the pre-commit hook and CI. Fix what they found: deprecated Quartz event types (ZapRequestEvent, SealEvent), Compose Desktop's deprecated clipboard, painterResource and tab indicator APIs, unused parameters, imports and variables, needless safe calls, and test code that no longer compiled cleanly. Deliberate cases, such as the OkHttp body null checks the offline flavor needs, are suppressed where they occur.
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
name: Test/Build Android
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master]
|
|
push:
|
|
branches: [master]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: 21
|
|
|
|
- name: Cache gradle
|
|
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Create keystore.properties
|
|
run: touch keystore.properties
|
|
|
|
- name: Linter (gradle)
|
|
run: ./gradlew ktlintCheck detektAll
|
|
|
|
- name: Test (gradle)
|
|
run: ./gradlew test --no-daemon
|
|
|
|
- name: Build APK (gradle)
|
|
run: ./gradlew assembleDebug --no-daemon
|
|
|
|
- name: Upload APK
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
with:
|
|
name: Debug APK
|
|
path: app/build/outputs/apk/free/debug/app-free-universal-debug.apk
|
|
|
|
- name: Upload Test Results
|
|
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
|
|
with:
|
|
name: Build Reports
|
|
path: app/build/reports
|
|
|
|
|