-
Notifications
You must be signed in to change notification settings - Fork 367
219 lines (183 loc) · 7.03 KB
/
java.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
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: Java CI
on:
push:
paths:
- 'java/**'
- '.github/workflows/java**'
pull_request:
paths:
- 'java/**'
- '.github/workflows/java**'
schedule:
# weekly build every FRI
- cron: "0 6 * * 5"
jobs:
matrix_build:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ ubuntu-latest, macOS-latest, windows-latest ]
java: [ 8, 11, 16, 17 ]
name: Java ${{ matrix.java }} Build on ${{ matrix.operating-system }}
steps:
- uses: actions/checkout@v3
- name: Setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Cache gradle wrapper
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('java/**/*.gradle*', 'java/**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('java/**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
#### BEGIN cucumber
- name: build cucumber with maven
working-directory: java/cucumber
run: mvn -B clean package --file pom.xml
#### END cucumber
#### BEGIN fitnesse
# gradlew:
- name: build with gradlew
working-directory: java/fitnesse
run: ./gradlew test
- uses: eskatos/gradle-command-action@v2
with:
build-root-directory: java/fitnesse
#fitnesse breaks with 8.0
gradle-version: 7.6
arguments: test --warning-mode all
#### END fitnesse
#### BEGIN hamcrest
- name: build hamcrest with maven
working-directory: java/hamcrest
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail"
# gradlew:
- name: build with gradlew
working-directory: java/hamcrest
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail
# gradle:
- uses: eskatos/gradle-command-action@v2
with:
build-root-directory: java/hamcrest
gradle-version: current
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail
- name: assure one failing test
working-directory: java/hamcrest
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'ThingTest > it_should_call_for_action() FAILED'"
#### END hamcrest
#### BEGIN hue4j5
- name: build hue4j5 with maven
working-directory: java/hue4j5
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail"
# gradlew:
- name: build with gradlew
working-directory: java/hue4j5
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail
# gradle:
- uses: eskatos/gradle-command-action@v2
with:
build-root-directory: java/hue4j5
gradle-version: current
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail
- name: assure one failing test
working-directory: java/hue4j5
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'ThingTest > it_should_call_for_action() FAILED'"
#### END hue4j5
#### BEGIN jqwik
- name: build jqwik with maven
working-directory: java/jqwik
run: mvn -B clean package --file pom.xml
# gradlew:
- name: build with gradlew
working-directory: java/jqwik
run: ./gradlew test --warning-mode all
# gradle:
- uses: eskatos/gradle-command-action@v2
with:
build-root-directory: java/jqwik
gradle-version: current
arguments: test --warning-mode all
#### END jqwik
#### BEGIN junit4
- name: build junit4 with maven
working-directory: java/junit4
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail"
# gradlew:
- name: build with gradlew
working-directory: java/junit4
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail
# gradle:
- uses: eskatos/gradle-command-action@v2
with:
build-root-directory: java/junit4
gradle-version: current
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail
- name: assure one failing test
working-directory: java/junit4
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'ThingTest > it_should_call_for_action FAILED'"
#### END junit4
#### BEGIN junit5
- name: build junit5 with maven
working-directory: java/junit5
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail"
# gradlew:
- name: build with gradlew
working-directory: java/junit5
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail
# gradle:
- uses: eskatos/gradle-command-action@v2
with:
build-root-directory: java/junit5
gradle-version: current
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail
- name: assure one failing test
working-directory: java/junit5
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'ThingTest > fail() FAILED'"
#### END junit5
#### BEGIN spock
- name: build spock with maven
working-directory: java/spock
run: mvn -B clean package --file pom.xml -Dtest="ThingSpec#notfail"
- name: assure one failing test
working-directory: java/spock
run: "sh ../../.scripts/assure_failing_test.sh 'mvn -B verify' 'ThingSpec.it should call for action:13 Condition not satisfied:'"
#### END spock
#### BEGIN truth
- name: build truth with maven
working-directory: java/truth
run: mvn -B clean package --file pom.xml -Dtest="ThingTest#it_should_not_fail"
# gradlew:
- name: build with gradlew
working-directory: java/truth
run: ./gradlew test --warning-mode all --tests ThingTest.it_should_not_fail
# gradle:
- uses: eskatos/gradle-command-action@v2
with:
build-root-directory: java/truth
gradle-version: current
arguments: test --warning-mode all --tests ThingTest.it_should_not_fail
- name: assure one failing test
working-directory: java/truth
run: "sh ../../.scripts/assure_failing_test.sh './gradlew test' 'truth.ComparisonFailureWithFacts at ThingTest.java:11'"
#### END truth
docker_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
#### BEGIN junit5
- name: docker junit5
working-directory: java/junit5
run: "sh ../../.scripts/assure_failing_test.sh './docker_test.sh' 'ThingTest > fail() FAILED'"
#### END junit5