-
Notifications
You must be signed in to change notification settings - Fork 7
90 lines (72 loc) · 2.44 KB
/
Copy pathandroid-master.yml
File metadata and controls
90 lines (72 loc) · 2.44 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# A workflow for controlling the actions taken by CI whenever we merge code into master
name: Android SDK Master CI
# Triggers the workflow on when code is merged into master
on:
push:
branches:
- 'master'
jobs:
# A job for running our tests
test:
name: Run Unit Tests
# The type of runner that the job will run on
runs-on: ubuntu-22.04
strategy:
matrix:
module: [ ':sdk:core', ':sdk:analytics', ':sdk:forms', ':sdk:push-fcm' ]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v4
# Sets up a JDK on the job so that we can run Java code
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
java-package: jdk
# Call Gradle to run the unit tests
- name: Unit Tests
run: ./gradlew ${{ matrix.module }}:test --stacktrace --no-daemon
# Another job for asserting our linting rules
ktlint:
name: Run ktlintCheck
# The type of runner that the job will run on
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v4
# Sets up a JDK on the job so that we can run Java code
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
java-package: jdk
# Call Gradle to run ktlint check
- name: KtlintCheck
run: bash ./gradlew ktlintCheck
# Another job for building our SDK's AAR file
aar:
name: Generate AAR
# The type of runner that the job will run on
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v4
# Sets up a JDK on the job so that we can run Java code
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
java-package: jdk
# Call Gradle to build our debug AAR
- name: Build debug AAR
run: ./gradlew assembleDebug --stacktrace --no-daemon
# Stores the generated AAR to an outputs folder
- name: Store AAR
uses: actions/upload-artifact@v4
with:
name: sdk
path: app/build/outputs/aar/debug/aar-debug.aar
overwrite: true