-
Notifications
You must be signed in to change notification settings - Fork 8
51 lines (42 loc) · 1.35 KB
/
test.yml
File metadata and controls
51 lines (42 loc) · 1.35 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
name: Unit Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch: {}
jobs:
test:
runs-on: ubuntu-latest
env:
GRADLE_VERSION: "8.13"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17 (Temurin)
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
cache: gradle
- name: Set up Android SDK
uses: android-actions/setup-android@v3
with:
packages: |
platforms;android-36 build-tools;36.0.0
- name: Install Gradle (no wrapper)
run: |
curl -L -o gradle-${GRADLE_VERSION}-bin.zip https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip
unzip -q gradle-${GRADLE_VERSION}-bin.zip -d "$HOME/gradle"
echo "$HOME/gradle/gradle-${GRADLE_VERSION}/bin" >> "$GITHUB_PATH"
gradle --version
- name: Run unit tests (debug)
run: gradle --no-daemon testDebugUnitTest --stacktrace --info
- name: Upload unit test reports
if: always()
uses: actions/upload-artifact@v4
with:
name: unit-test-reports-${{ github.run_number }}
path: |
**/build/reports/tests/testDebugUnitTest/**
**/build/test-results/testDebugUnitTest/**