-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.25 KB
/
android.yml
File metadata and controls
51 lines (45 loc) · 1.25 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: Android CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
checks: write
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check formatting
run: ./gradlew spotlessCheck
- name: Compile (catch syntax/build errors)
run: ./gradlew compileDebugJavaWithJavac
- name: Run unit tests
run: ./gradlew testDebugUnitTest --info
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: TeamCode/build/test-results/testDebugUnitTest/
- name: Upload HTML test report
uses: actions/upload-artifact@v4
with:
name: junit-html-report
path: TeamCode/build/reports/tests/testDebugUnitTest/
- name: Report JUnit test results
uses: dorny/test-reporter@v1
if: always()
with:
name: JUnit Tests
path: TeamCode/build/test-results/testDebugUnitTest/TEST-*.xml
reporter: java-junit