-
-
Notifications
You must be signed in to change notification settings - Fork 257
58 lines (54 loc) · 1.89 KB
/
ci.yml
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: Android CI
on: [push, pull_request]
jobs:
validation:
name: Validate Gradle Wrapper
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- uses: gradle/wrapper-validation-action@v2
lint:
name: Run Lint Checks
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
distribution: 'temurin'
java-version: 17
- name: Lint
run: bash ./gradlew lint
test:
name: Run Unit Tests
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
distribution: 'temurin'
java-version: 17
- name: Unit tests
run: bash ./gradlew test --stacktrace
apk:
name: Generate APK
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4.2.1
with:
distribution: 'temurin'
java-version: 17
- name: Build debug APK
run: bash ./gradlew assembleDev --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v4
with:
name: app-dev-debug
path: News-Android-App/build/outputs/apk/dev/debug/News-Android-App-dev-debug.apk