Skip to content

Commit 7ed2853

Browse files
committed
Run unit tests before setting up minikube to fail fast.
1 parent 1b0b6d7 commit 7ed2853

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ jobs:
2323
- name: Set up JDK
2424
uses: actions/setup-java@v1
2525
with:
26-
java-version: ${{ matrix.java }}
26+
java-version:
27+
- name: Run unit tests
28+
run: mvn -B test -P no-integration-tests --file pom.xml
2729
- name: Set up Minikube
2830
uses: manusa/[email protected]
2931
with:
3032
minikube version: 'v1.15.0'
3133
kubernetes version: ${{ matrix.kubernetes }}
3234
driver: 'docker'
33-
- name: Build with Maven
34-
run: mvn -B package --file pom.xml
35+
- name: Run integration tests
36+
run: mvn -B package -P no-unit-tests --file pom.xml
3537

pom.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,26 @@
152152
</plugins>
153153
</build>
154154
</profile>
155+
<profile>
156+
<id>no-unit-tests</id>
157+
<build>
158+
<plugins>
159+
<plugin>
160+
<groupId>org.apache.maven.plugins</groupId>
161+
<artifactId>maven-surefire-plugin</artifactId>
162+
<version>${surefire.version}</version>
163+
<configuration>
164+
<includes>
165+
<exclude>**/*IT.java</exclude>
166+
</includes>
167+
<excludes>
168+
<include>**/*Test.java</include>
169+
</excludes>
170+
</configuration>
171+
</plugin>
172+
</plugins>
173+
</build>
174+
</profile>
155175
<profile>
156176
<id>release</id>
157177
<build>

0 commit comments

Comments
 (0)