-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.14 KB
/
gradle-test.yml
File metadata and controls
44 lines (36 loc) · 1.14 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
name: Gradle CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository (with submodules)
uses: actions/checkout@v4
with:
submodules: recursive # or true if you only need first-level
fetch-depth: 0 # ensures full history for submodules
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run tests
run: ./gradlew :test --stacktrace
# Upload the test reports as artifacts
- name: Upload test reports
uses: actions/upload-artifact@v4
with:
name: junit-report
path: build/test-results/test
# Publish test results so they appear in GitHub Actions UI
- name: Publish Test Results
uses: mikepenz/action-junit-report@v4
if: always() # always run even if tests fail
with:
report_paths: '**/build/test-results/test/TEST-*.xml'