-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.33 KB
/
ci.yml
File metadata and controls
58 lines (46 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: Build & test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run Android lint
run: ./gradlew lint --no-daemon
- name: Run unit tests
run: ./gradlew testDebugUnitTest --no-daemon
- name: Assemble debug APK
run: ./gradlew assembleDebug --no-daemon
- name: Upload debug APK
uses: actions/upload-artifact@v4
with:
name: app-debug
path: app/build/outputs/apk/debug/*.apk
if-no-files-found: error
retention-days: 7
- name: Upload lint reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: lint-reports
path: '**/build/reports/lint-results-*.html'
retention-days: 7