Skip to content

Run integration tests on every build #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,27 @@ jobs:
strategy:
matrix:
java: [8, 11, 15]
kubernetes: ['v1.17.13','v1.18.12','v1.19.4']
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
${{ runner.os }}-maven-
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -B package -P no-integration-tests --file pom.xml
- name: Run unit tests
run: mvn -B test -P no-integration-tests --file pom.xml
- name: Set up Minikube
uses: manusa/actions-setup-minikube@v2.0.1
with:
minikube version: 'v1.15.0'
kubernetes version: ${{ matrix.kubernetes }}
driver: 'docker'
- name: Run integration tests
run: mvn -B package -P no-unit-tests --file pom.xml

20 changes: 20 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,26 @@
</plugins>
</build>
</profile>
<profile>
<id>no-unit-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<includes>
<exclude>**/*IT.java</exclude>
</includes>
<excludes>
<include>**/*Test.java</include>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
Expand Down