-
-
Notifications
You must be signed in to change notification settings - Fork 86
79 lines (77 loc) · 1.99 KB
/
verify-android.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: 📱 Validate Android
on:
push:
branches:
- main
paths:
- '.github/workflows/verify-android.yml'
- 'android/**'
pull_request:
branches:
- main
paths:
- '.github/workflows/verify-android.yml'
- 'android/**'
jobs:
ktlint:
runs-on: ubuntu-latest
name: 🔎 Kotlin Lint
steps:
- uses: actions/checkout@v3
- uses: touchlab-lab/[email protected]
with:
ktlint_version: 0.48.0
- run: ktlint "android/src/**/*.kt"
android-lint:
runs-on: ubuntu-latest
name: 🔎 Android Lint
defaults:
run:
working-directory: ./android
steps:
- uses: actions/checkout@v3
- name: Setup JDK 11
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '11'
- name: Install dependencies
run: yarn install --frozen-lockfile --cwd ..
- name: Run Gradle Lint
run: ./gradlew lint
android-build:
runs-on: ubuntu-latest
name: 🏗️ Android Build
defaults:
run:
working-directory: ./android
steps:
- uses: actions/checkout@v3
- name: Setup JDK 11
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '11'
- name: Install dependencies
run: yarn install --frozen-lockfile --cwd ..
- name: Run Gradle Lint
run: ./gradlew assembleDebug
detekt:
runs-on: ubuntu-latest
name: 🧬 Run detekt
defaults:
run:
working-directory: ./android
steps:
- uses: actions/checkout@v3
- name: Setup JDK 11
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '11'
- name: Install Detekt
run: |
curl -sSLO https://github.com/detekt/detekt/releases/download/v1.23.1/detekt-cli-1.23.1.zip
unzip detekt-cli-1.23.1.zip
- name: Run Detekt
run: ./detekt-cli-1.23.1/bin/detekt-cli