Skip to content

Commit 329aca1

Browse files
committed
Merge branch 'main' into oteljsonrpc
2 parents d133758 + b41f2c1 commit 329aca1

19 files changed

Lines changed: 112 additions & 87 deletions

File tree

.github/workflows/full-build.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,24 @@ jobs:
2222
java-version: 25
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v5
25+
uses: actions/checkout@v6
2626
- name: Set up JDK ${{ matrix.java-version }}
2727
uses: actions/setup-java@v5
2828
with:
2929
java-version: ${{ matrix.java-version }}
3030
distribution: 'temurin'
3131
cache: maven
32+
33+
# 1. Set up Go (cross-platform)
34+
- name: Set up Go
35+
uses: actions/setup-go@v6
36+
with:
37+
go-version: 'stable'
38+
39+
# 2. Install grpcurl (this places it in the $PATH automatically)
40+
- name: Install grpcurl
41+
run: go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
42+
3243
- name: Build
3344
run: mvn -B install -P gradlePlugin --no-transfer-progress
3445
env:
@@ -48,6 +59,7 @@ jobs:
4859
4960
tests, failures, errors, skipped = 0, 0, 0, 0
5061
failed_tests = set()
62+
skipped_tests = set()
5163
5264
for f in files:
5365
try:
@@ -63,20 +75,24 @@ jobs:
6375
errors += int(suite.attrib.get("errors", 0))
6476
skipped += int(suite.attrib.get("skipped", 0))
6577
66-
# Collect names of failing tests
78+
# Collect names of failing and skipped tests
6779
for case in suite.findall("testcase"):
6880
if case.find("failure") is not None or case.find("error") is not None:
6981
# Strip the package path from the classname for a cleaner display
7082
cls = case.attrib.get("classname", "UnknownClass").split(".")[-1]
7183
name = case.attrib.get("name", "UnknownMethod")
7284
failed_tests.add(f"- `{cls}.{name}`")
85+
elif case.find("skipped") is not None:
86+
cls = case.attrib.get("classname", "UnknownClass").split(".")[-1]
87+
name = case.attrib.get("name", "UnknownMethod")
88+
skipped_tests.add(f"- `{cls}.{name}`")
7389
except Exception as e:
7490
print(f"Error parsing {f}: {e}")
7591
7692
passed = tests - failures - errors - skipped
7793
summary_file = os.environ.get("GITHUB_STEP_SUMMARY")
7894
79-
with open(summary_file, "a") as f:
95+
with open(summary_file, "a", encoding="utf-8") as f:
8096
if not files:
8197
f.write("⚠️ **Could not find any `TEST-*.xml` files.**\n")
8298
else:
@@ -97,4 +113,10 @@ jobs:
97113
else:
98114
f.write("### 🎉 100% Pass Rate!\n")
99115
f.write(f"The build is green across all {tests} tests.\n")
116+
117+
# Provide specific feedback for skips
118+
if skipped > 0:
119+
f.write("\n### ⚠️ Skipped Tests\n")
120+
for test in sorted(skipped_tests):
121+
f.write(f"{test}\n")
100122
'

.github/workflows/maven-central.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v6
1414
- name: Set up JDK 21
15-
uses: actions/setup-java@v4
15+
uses: actions/setup-java@v5
1616
with:
1717
java-version: 21
1818
distribution: 'temurin'

.github/workflows/reproducibility.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616
with:
1717
ref: main
1818

modules/jooby-apt/pom.xml

Lines changed: 8 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -181,48 +181,14 @@
181181

182182
<plugin>
183183
<groupId>org.apache.maven.plugins</groupId>
184-
<artifactId>maven-shade-plugin</artifactId>
185-
<executions>
186-
<execution>
187-
<id>fat-jar</id>
188-
<goals>
189-
<goal>shade</goal>
190-
</goals>
191-
<phase>package</phase>
192-
<configuration>
193-
<minimizeJar>true</minimizeJar>
194-
<filters>
195-
<filter>
196-
<artifact>*:*</artifact>
197-
<excludes>
198-
<exclude>META-INF/LICENSE</exclude>
199-
<exclude>META-INF/LICENSE.txt</exclude>
200-
<exclude>META-INF/NOTICE</exclude>
201-
<exclude>META-INF/NOTICE.txt</exclude>
202-
<exclude>META-INF/DEPENDENCIES</exclude>
203-
204-
<exclude>META-INF/MANIFEST.MF</exclude>
205-
206-
<exclude>module-info.class</exclude>
207-
<exclude>META-INF/versions/*/module-info.class</exclude>
208-
209-
<exclude>META-INF/*.SF</exclude>
210-
<exclude>META-INF/*.DSA</exclude>
211-
<exclude>META-INF/*.RSA</exclude>
212-
</excludes>
213-
</filter>
214-
</filters>
215-
<transformers>
216-
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
217-
<manifestEntries>
218-
<Automatic-Module-Name>io.jooby.apt</Automatic-Module-Name>
219-
</manifestEntries>
220-
</transformer>
221-
<transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer"/>
222-
</transformers>
223-
</configuration>
224-
</execution>
225-
</executions>
184+
<artifactId>maven-jar-plugin</artifactId>
185+
<configuration>
186+
<archive>
187+
<manifestEntries>
188+
<Automatic-Module-Name>io.jooby.apt</Automatic-Module-Name>
189+
</manifestEntries>
190+
</archive>
191+
</configuration>
226192
</plugin>
227193
</plugins>
228194
</build>

modules/jooby-flyway/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<version>${jooby.version}</version>
1919
</dependency>
2020

21-
<!-- https://mvnrepository.com/artifact/org.flywaydb/flyway-core -->
2221
<dependency>
2322
<groupId>org.flywaydb</groupId>
2423
<artifactId>flyway-core</artifactId>

modules/jooby-openapi/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
<groupId>jakarta.validation</groupId>
3434
<artifactId>jakarta.validation-api</artifactId>
3535
</dependency>
36+
<!-- Swagger depends on this legacy API -->
37+
<dependency>
38+
<groupId>javax.xml.bind</groupId>
39+
<artifactId>jaxb-api</artifactId>
40+
<version>2.3.1</version>
41+
</dependency>
3642
<!-- ASM -->
3743
<dependency>
3844
<groupId>org.ow2.asm</groupId>

pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,6 +1409,14 @@
14091409
<jooby.maven.build>true</jooby.maven.build>
14101410
</systemPropertyVariables>
14111411
<argLine>@{argLine}</argLine>
1412+
<statelessTestsetReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter">
1413+
<disable>false</disable>
1414+
<version>3.0</version>
1415+
<usePhrasedFileName>false</usePhrasedFileName>
1416+
<usePhrasedTestSuiteClassName>true</usePhrasedTestSuiteClassName>
1417+
<usePhrasedTestCaseClassName>true</usePhrasedTestCaseClassName>
1418+
<usePhrasedTestCaseMethodName>true</usePhrasedTestCaseMethodName>
1419+
</statelessTestsetReporter>
14121420
</configuration>
14131421
</plugin>
14141422
</plugins>

tests/src/test/java/io/jooby/i3500/WidgetService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public WidgetService() {
1818
"/api/widgets1",
1919
ctx -> {
2020
Widget widget = ctx.body().to(Widget.class);
21-
System.out.println("Created " + widget);
2221
return ctx.send(StatusCode.CREATED);
2322
});
2423

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Jooby https://jooby.io
3+
* Apache License Version 2.0 https://jooby.io/LICENSE.txt
4+
* Copyright 2014 Edgar Espina
5+
*/
6+
package io.jooby.junit;
7+
8+
import java.lang.reflect.Method;
9+
import java.util.List;
10+
import java.util.stream.Stream;
11+
12+
import org.junit.jupiter.api.DisplayNameGenerator;
13+
14+
public class CleanMethodNameGenerator extends DisplayNameGenerator.Standard {
15+
@Override
16+
public String generateDisplayNameForMethod(
17+
List<Class<?>> enclosingInstanceTypes, Class<?> testClass, Method testMethod) {
18+
// remove (ServerTestRunner) from test name:
19+
var args =
20+
Stream.of(testMethod.getParameters())
21+
.filter(param -> !param.getType().equals(ServerTestRunner.class))
22+
.toList();
23+
return args.isEmpty()
24+
? testMethod.getName()
25+
: super.generateDisplayNameForMethod(enclosingInstanceTypes, testClass, testMethod);
26+
}
27+
}

tests/src/test/java/io/jooby/junit/ServerExtensionImpl.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private TestTemplateInvocationContext invocationContext(ServerInfo serverInfo) {
117117
return new TestTemplateInvocationContext() {
118118
@Override
119119
public String getDisplayName(int invocationIndex) {
120-
return serverInfo.description;
120+
return isMavenBuild() ? "(" + serverInfo.description + ")" : serverInfo.description;
121121
}
122122

123123
@Override
@@ -138,4 +138,8 @@ private static String displayName(Class server, ExecutionMode mode, int i, int t
138138
}
139139
return displayName.toString();
140140
}
141+
142+
static boolean isMavenBuild() {
143+
return !System.getProperty("surefire.real.class.path", "").isEmpty();
144+
}
141145
}

0 commit comments

Comments
 (0)