-
Notifications
You must be signed in to change notification settings - Fork 1
203 lines (198 loc) · 5.34 KB
/
default-tests.yml
File metadata and controls
203 lines (198 loc) · 5.34 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
name: Java CI
on: [push, pull_request]
jobs:
checkstyle:
name: Run checkstyle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
java-package: jdk
- name: Run checkstyle with Gradle
run: ./gradlew clean checkstyleMain checkstyleTest
test:
name: Run basic test with Java ${{ matrix.java_version }}
runs-on: ubuntu-latest
needs: checkstyle
strategy:
matrix:
java_version: [
'11',
'12',
'13',
'14',
'15',
'16',
'17',
'18',
'19',
'20',
'21',
'22',
'23',
'24',
'25',
'26'
]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
java-package: jdk
- name: Build with Gradle
run: ./gradlew clean build
integration-test:
name: Run integration test with Java ${{ matrix.java_version }} and Gradle ${{ matrix.gradle_version }}
runs-on: ubuntu-latest
needs: test
continue-on-error: true
strategy:
fail-fast: false
matrix:
java_version: ['11']
gradle_version: [
'9.4.0',
'9.3.1',
'8.14.4',
'9.3.0',
'9.2.1',
'9.2.0',
'9.1.0',
'9.0.0',
'8.14.3',
'7.6.6',
'8.14.2',
'7.6.5',
'8.14.1',
'8.14',
'8.13',
'8.12.1',
'8.12',
'8.11.1',
'8.11',
'8.10.2',
'8.10.1',
'8.10',
'8.9',
'8.8',
'8.7',
'7.6.4',
'8.6',
'8.5',
'8.4',
'7.6.3',
'8.3',
'8.2.1',
'8.2',
'7.6.2',
'8.1.1',
'8.1',
'8.0.2',
'8.0.1',
'8.0',
'7.6.1',
'7.6',
'7.5.1',
'7.5',
'7.4.2',
'7.4.1',
'7.4',
'7.3.3',
'7.3.2',
'7.3.1',
'7.3',
'7.2',
'7.1.1',
'7.1',
'7.0.2',
'7.0.1',
'7.0',
'6.9.4',
'6.9.3',
'6.9.2',
'6.9.1',
'6.9',
'6.8.3',
'6.8.2',
'6.8.1',
'6.8',
'6.7.1',
'6.7',
'6.6.1',
'6.6',
'6.5.1',
'6.5',
'6.4.1',
'6.4',
'6.3',
'6.2.2',
'6.2.1',
'6.2',
'6.1.1',
'6.1',
'6.0.1',
'6.0',
'5.6.4',
'5.6.3',
'5.6.2',
'5.6.1',
'5.6',
'5.5.1',
'5.5',
'5.4.1',
'5.4',
'5.3.1',
'5.3',
'5.2.1',
'5.2',
'5.1',
# '5.2.1', # Extension injection is only supported for 5.3 and onwards https://github.com/gradle/gradle/issues/24947
# '5.2', # Extension injection is only supported for 5.3 and onwards https://github.com/gradle/gradle/issues/24947
# '5.1', # Extension injection is only supported for 5.3 and onwards https://github.com/gradle/gradle/issues/24947
# '5.0', # Doesn't support conventions: https://docs.gradle.org/5.1/release-notes.html#specify-a-convention-for-a-property
]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK ${{ matrix.java_version }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ matrix.java_version }}
java-package: jdk
- name: Install a test version with Gradle
run: ./gradlew clean publishAllPublicationsToLocalPluginRepositoryRepository
- name: Setup TEMP_DIR
run: echo "TEMP_DIR=$(mktemp -d --tmpdir=/home/runner/work/git-commit-id-gradle-plugin/git-commit-id-gradle-plugin git-commit-id-gradle-debugging.XXXXXXXXXX)" >> $GITHUB_ENV
- name: Checkout git-commit-id-gradle-debugging to run actual gradle integration tests
uses: actions/checkout@v4
with:
submodules: recursive
repository: git-commit-id/git-commit-id-gradle-debugging
path: ${{env.TEMP_DIR}}
- name: Setup Gradle ${{ matrix.gradle_version }}
run: |
cd "${{env.TEMP_DIR}}"
./gradlew wrapper --gradle-version ${{ matrix.gradle_version }} --distribution-type bin
- name: Verify Setup of Gradle ${{ matrix.gradle_version }}
run: |
cd "${{env.TEMP_DIR}}"
./gradlew -version
- name: Run the local testversion with Gradle
run: |
cd "${{env.TEMP_DIR}}"
./gradlew clean build --rerun-tasks
- name: Validate if the testversion has produced the desired output
run: /bin/bash -c '[[ -f "${{env.TEMP_DIR}}"/build/git.properties ]] && cat "${{env.TEMP_DIR}}"/build/git.properties || exit 1;'