Skip to content

Commit

Permalink
Add surefire
Browse files Browse the repository at this point in the history
  • Loading branch information
ZID-DevOps authored and hjannasch committed Jan 3, 2024
1 parent bcdc862 commit 7c4c4e2
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ on:
jobs:
maven-build:
uses: hjannasch/workflows-java/.github/workflows/java-maven-build.yml@main
permissions:
contents: read
checks: write
37 changes: 37 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<name>example-spring-boot</name>
<description>Demo project for Spring Boot</description>
<properties>
<maven.surefire.plugin.version>3.2.3</maven.surefire.plugin.version>
<java.version>21</java.version>
</properties>
<dependencies>
Expand All @@ -35,6 +36,42 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
<executions>
<execution>
<id>unit-tests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skipTests>false</skipTests>
<excludes>
<exclude>ch/bs/zid/kdm/**/*IT.java</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skipTests>false</skipTests>
<includes>
<include>ch/bs/zid/kdm/**/*IT.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
Expand Down
14 changes: 14 additions & 0 deletions src/test/java/com/example/examplespringboot/SomeTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.example.examplespringboot;


import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class SomeTests {
@Test
void test() {
assertTrue(true);
}
}

0 comments on commit 7c4c4e2

Please sign in to comment.