-
Notifications
You must be signed in to change notification settings - Fork 47
68 lines (62 loc) · 2.02 KB
/
gradle-build.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
name: Gradle Build and Test
on:
pull_request:
push:
workflow_dispatch: {}
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: temurin
# Always build with JDK 8 initially
java-version: 8
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
- name: Execute Gradle build
run: ./gradlew clean check integrationTest --scan --stacktrace
- name: 'Publish Test Results'
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always()
with:
files: |
**/build/test-results/**/*.xml
- name: JaCoCo Test Coverage Report
uses: PavanMudigonda/[email protected]
with:
coverage_results_path: "htmlSanityCheck-gradle-plugin/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@master
with:
name: maven-repo
path: build/maven-repo
test-java-os-mix:
needs: gradle
strategy:
matrix:
os-version: [ ubuntu-latest, macos-latest, windows-latest ]
java-version: [ 11, 17, 21 ]
runs-on: ${{ matrix.os-version }}
steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@master
with:
name: maven-repo
path: build/maven-repo
- uses: actions/setup-java@v3
with:
distribution: temurin
# Always build with JDK 8 initially
java-version: ${{ matrix.java-version }}
- name: Execute integration test
run: |
./gradlew --version
./gradlew integrationTestOnly --scan