Skip to content

Commit

Permalink
Grouping test logs on github actions
Browse files Browse the repository at this point in the history
Signed-off-by: Marvin Froeder <marvin@datasqrl.com>
  • Loading branch information
velo committed Dec 5, 2024
1 parent fae1df4 commit d4bf74f
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 9 deletions.
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@
</dependency>

<!-- common test infra-->
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand Down Expand Up @@ -761,16 +766,11 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
<scope>import</scope>
<type>pom</type>
</dependency>

<!-- logging -->
Expand Down
6 changes: 6 additions & 0 deletions sqrl-calcite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,12 @@
<excludes>
<exclude>**/*IT*.java</exclude>
</excludes>
<properties>
<property>
<name>junit.jupiter.execution.listeners.default</name>
<value>com.datasqrl.GroupingTestExecutionListener</value>
</property>
</properties>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.datasqrl;

import org.junit.platform.launcher.TestIdentifier;
import org.junit.platform.launcher.listeners.SummaryGeneratingListener;

public class GroupingTestExecutionListener extends SummaryGeneratingListener {

@Override
public void executionStarted(TestIdentifier testIdentifier) {
if (testIdentifier.isTest()) {
System.out.println("::group::" + testIdentifier.getDisplayName());
}
}

@Override
public void executionFinished(TestIdentifier testIdentifier, org.junit.platform.engine.TestExecutionResult testExecutionResult) {
if (testIdentifier.isTest()) {
System.out.println("::endgroup::");
}
}
}
17 changes: 17 additions & 0 deletions sqrl-planner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@

<artifactId>sqrl-planner</artifactId>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<properties>
<property>
<name>junit.jupiter.execution.listeners.default</name>
<value>com.datasqrl.GroupingTestExecutionListener</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Expand Down
17 changes: 17 additions & 0 deletions sqrl-testing/sqrl-integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@

<artifactId>sqrl-integration-tests</artifactId>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<properties>
<property>
<name>junit.jupiter.execution.listeners.default</name>
<value>com.datasqrl.GroupingTestExecutionListener</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Expand Down
12 changes: 12 additions & 0 deletions sqrl-tools/sqrl-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<properties>
<property>
<name>junit.jupiter.execution.listeners.default</name>
<value>com.datasqrl.GroupingTestExecutionListener</value>
</property>
</properties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down
17 changes: 17 additions & 0 deletions sqrl-tools/sqrl-discovery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@

<artifactId>sqrl-discovery</artifactId>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<properties>
<property>
<name>junit.jupiter.execution.listeners.default</name>
<value>com.datasqrl.GroupingTestExecutionListener</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
Expand Down
17 changes: 17 additions & 0 deletions sqrl-tools/sqrl-packager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@

<artifactId>sqrl-packager</artifactId>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<properties>
<property>
<name>junit.jupiter.execution.listeners.default</name>
<value>com.datasqrl.GroupingTestExecutionListener</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>

<properties>
<lombok.version>1.18.24</lombok.version>
<vertx.version>4.3.5</vertx.version>
Expand Down

0 comments on commit d4bf74f

Please sign in to comment.