Skip to content

Commit 31967ae

Browse files
christophstroblschauder
authored andcommitted
Add build profile for ci
1 parent 28c3ed6 commit 31967ae

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
- name: Build with Maven
2525
env:
2626
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
27-
run: ./mvnw clean verify -B
27+
run: ./mvnw clean verify -B -Dci

mongodb/fragment-spi/sample/src/test/java/com/example/data/mongodb/MovieRepositoryTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
import org.junit.jupiter.api.BeforeEach;
2525
import org.junit.jupiter.api.Test;
26+
import org.junit.jupiter.api.condition.DisabledIfEnvironmentVariable;
2627
import org.slf4j.Logger;
2728
import org.slf4j.LoggerFactory;
2829
import org.slf4j.event.Level;
@@ -46,6 +47,7 @@
4647
*/
4748
@SpringBootTest
4849
@Testcontainers
50+
@DisabledIfEnvironmentVariable(named = "ci", matches = "true")
4951
class MovieRepositoryTests {
5052

5153
private static final Logger log = LoggerFactory.getLogger(MovieRepositoryTests.class);

pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,22 @@
5757
</properties>
5858
</profile>
5959

60+
<profile>
61+
<id>ci</id>
62+
<build>
63+
<plugins>
64+
<plugin>
65+
<artifactId>maven-surefire-plugin</artifactId>
66+
<configuration>
67+
<environmentVariables>
68+
<ci>true</ci>
69+
</environmentVariables>
70+
</configuration>
71+
</plugin>
72+
</plugins>
73+
</build>
74+
</profile>
75+
6076
</profiles>
6177

6278
<developers>

0 commit comments

Comments
 (0)