-
-
Notifications
You must be signed in to change notification settings - Fork 147
53 lines (45 loc) · 1.48 KB
/
gradle.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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Build with Gradle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
if: github.actor == github.event.repository.owner.login
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11', '17', '21' ]
name: Build under JDK ${{ matrix.Java }}
steps:
- name: Checkout github repo (+ download lfs dependencies)
uses: actions/checkout@v4
with:
lfs: true
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: check build --stacktrace
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/TEST-*.xml'