-
Notifications
You must be signed in to change notification settings - Fork 41
160 lines (136 loc) · 4.58 KB
/
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: Android CI
on:
push:
branches: [ main ]
pull_request:
branches:
- '**'
env:
BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }}
BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }}
BUILD_CACHE_AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_CACHE_AWS_ACCESS_KEY_ID }}
BUILD_CACHE_AWS_SECRET_KEY: ${{ secrets.BUILD_CACHE_AWS_SECRET_KEY }}
jobs:
lint:
name: Spotless check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: adopt
java-version: 17
- name: spotless
run: ./gradlew spotlessCheck --scan
vale:
name: Vale doc linter
if: ${{ false }} # disable for now
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: errata-ai/vale-action@reviewdog
with:
# added, diff_context, file, nofilter
filter_mode: nofilter
# github-pr-check, github-pr-review, github-check
reporter: github-pr-check
fail_on_error: true
files: docusaurus
env:
# Required, set by GitHub actions automatically:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
api_check:
name: API check
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
distribution: adopt
java-version: 17
- name: API check
run: ./gradlew apiCheck --scan
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: set up JDK
uses: actions/[email protected]
with:
distribution: adopt
java-version: 17
- name: Cache Gradle and wrapper
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Make Gradle executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: |
./gradlew --scan --stacktrace \
assembleDebug
unitTest:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: set up JDK
uses: actions/[email protected]
with:
distribution: adopt
java-version: 17
- name: Cache Gradle and wrapper
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run unit tests
run: |
./gradlew :stream-video-android-ui-compose:testDebugUnitTest --scan --stacktrace
./gradlew :stream-video-android-core:testDebugUnitTest --scan --stacktrace
- name: Unit tests core results
uses: actions/upload-artifact@v4
with:
name: unit-tests-core-results
path: stream-video-android-core/build/reports/tests/testDebugUnitTest/index.html
- name: Unit tests compose results
uses: actions/upload-artifact@v4
with:
name: unit-tests-compose-results
path: stream-video-android-ui-compose/build/reports/tests/testDebugUnitTest/index.html
androidTest-GMD:
name: Android Test with GMD
if: ${{ false }} # disable for now
runs-on: macOS-latest
timeout-minutes: 55
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 17
# Sets gradle up
- name: Setup Gradle
uses: gradle/[email protected]
# Cleans managed device if previously settle and space currently is not available
- name: Clean Managed Devices
run: ./gradlew cleanManagedDevices --unused-only
- name: Run instrumented tests with GMD
run: ./gradlew pixel2api31DebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true -Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=60