-
Notifications
You must be signed in to change notification settings - Fork 13
148 lines (143 loc) · 5.33 KB
/
Copy pathgradle.yml
File metadata and controls
148 lines (143 loc) · 5.33 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: CI
on:
push:
branches:
- main
paths-ignore:
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
pull_request:
branches:
- main
paths-ignore:
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
jobs:
gradle-wrapper-validation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: gradle/wrapper-validation-action@v3
check-java-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# net.linguica.gradle.maven.settings plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml
- name: Check Java formatting
uses: gradle/gradle-build-action@v3
with:
cache-disabled: true
gradle-version: 8.3
arguments: --no-daemon --stacktrace spotlessJavaCheck
build-gradle-1:
needs: [gradle-wrapper-validation, check-java-formatting]
strategy:
fail-fast: false
matrix:
gradle: [4.10.3, "5.0", 5.1.1, 5.2.1, 5.3.1, 5.4.1, 5.5.1, 5.6.4, 6.0.1, 6.1.1, 6.2.2, 6.3, 6.4.1, 6.5.1, 6.6.1, 6.7.1, 6.8.3, 6.9.4, 7.0.2, 7.1.1, 7.2, 7.3.3, 7.4.2, 7.5.1, 7.6.3, 8.0.2, 8.1.1, 8.2.1]
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif
if: github.repository == 'project-ncl/gradle-manipulator' && github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 11
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 11
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# net.linguica.gradle.maven.settings plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml
- name: Fix build for Gradle ${{ matrix.gradle }}
run: ./gradle/fix-build.sh ${{ matrix.gradle }}
- uses: gradle/gradle-build-action@v3
with:
gradle-version: ${{ matrix.gradle }}
arguments: --no-daemon --stacktrace clean build AggregateJacocoReport
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}
- name: Codecov
uses: codecov/codecov-action@v5
with:
files: ./build/reports/jacoco/aggregate/jacocoTestReport.xml
verbose: true
build-gradle-2:
needs: [gradle-wrapper-validation, check-java-formatting]
strategy:
fail-fast: false
matrix:
gradle: [8.3, 8.4, 8.5, 8.8, "8.10.2", "8.12.1", "8.13", "8.14.3", "9.0.0", "9.1.0"]
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif
if: github.repository == 'project-ncl/gradle-manipulator' && github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# net.linguica.gradle.maven.settings plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml
- uses: gradle/gradle-build-action@v3
with:
gradle-version: ${{ matrix.gradle }}
arguments: --no-daemon --stacktrace clean build AggregateJacocoReport
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# if: ${{ failure() }}
- name: Codecov
uses: codecov/codecov-action@v5
with:
files: ./build/reports/jacoco/aggregate/jacocoTestReport.xml
verbose: true
snapshot:
if: github.repository == 'project-ncl/gradle-manipulator' && github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: gradle/wrapper-validation-action@v3
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: 17
- name: Remove default github maven configuration
# This step is a workaround to avoid a decryption issue of Beam's
# net.linguica.gradle.maven.settings plugin and github's provided maven
# settings.xml file
run: rm ~/.m2/settings.xml
# https://github.com/marketplace/actions/maven-setings-action
- name: Maven Settings
uses: s4u/maven-settings-action@v4.0.0
with:
sonatypeSnapshots: true
githubServer: false
servers: |
[{
"id": "central",
"username": "${{ secrets.SONATYPE_USERNAME }}",
"password": "${{ secrets.SONATYPE_PASSWORD }}"
}]
- uses: gradle/gradle-build-action@v3
with:
arguments: build publishToCentral -x test -x funcTest