-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (62 loc) · 1.76 KB
/
mainAndroid.yml
File metadata and controls
73 lines (62 loc) · 1.76 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Android CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 22
uses: actions/setup-java@v3
with:
java-version: '22'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Clean Bulid
run: ./gradlew ktlintCheck
- name: Run Unit Test
run: ./gradlew test
- name: Run Android Test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 28
target: default
arch: x86
script: ./gradlew connectedCheck --stacktrace
run: ./gradlew connectedAndroidTest
- name: Assemble
run: ./gradlew assemble
- name: Upload Debug APK
uses: actions/upload-artifact@v3
with:
name: debug
path: ./app/build/outputs/apk/debug/app-debug.apk
- name: Upload Release APK
uses: actions/upload-artifact@v3
with:
name: release
path: ./app/build/outputs/apk/release/app-release-unsigned.apk
- name: task name
run: ./gradlew some command name
notification:
name: Notification
runs-on: ubuntu-latest
if: ${{ always() }}
needs: [build]
steps:
- uses: martialonline/workflow-status@v3
id: check
- name: action-slack
uses: 8398a7/action-slack@v3
with:
status: ${{ steps.check.outputs.status }}
author_name: Github Action Bot
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: always()