Skip to content

test: Add integration tests for maven and jar deployments #41

test: Add integration tests for maven and jar deployments

test: Add integration tests for maven and jar deployments #41

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Integration test suite
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
# debian-12-tomcat-war-systemd:
# name: Run Debian 12 Tomcat WAR systemd integration tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# id: buildx
# with:
# install: true
# - name: Set up JDK 17
# uses: actions/setup-java@v2
# with:
# distribution: 'temurin'
# java-version: '17'
# - name: Cache Maven packages
# uses: actions/cache@v4
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
# # - name: Maven dependency resolution in ~/.m2
# # run: |
# # mvn dependency:go-offline -Dmaven.repo.local=~/.m2
# # mvn clean
# - name: Run integration tests
# run: ./.integration-scenarios/debian-12-tomcat-war-systemd/run.sh -t -p
debian-12-jar-mvn-build-docker:
name: Update dependencies in maven cache
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build Docker Images for jar and mvn
run: mvn clean package -DskipTests
# debian-12-jar-mvn-build-graphs:
# name: Build Graphs with mvn and jar
# needs: debian-12-jar-mvn-build-docker
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# id: buildx
# with:
# install: true
# - name: Build Docker Images for jar and mvn
## run: ./.integration-scenarios/debian-12-jar-mvn/run.sh -mjt 'build-graph-*'
# run: |
# ./.integration-scenarios/debian-12-jar-mvn/tests/build-graph-bike-electric.sh jar
# ./.integration-scenarios/debian-12-jar-mvn/tests/build-graph-bike-mountain.sh mvn
debian-12-jar-mvn-run-tests:
needs: debian-12-jar-mvn-build-docker
name: Run Debian 12 Maven JAR integration tests
runs-on: ubuntu-latest
strategy:
matrix:
runtype: [ '-m' , '-j' ]
testgroup: [ build*car*, build*public*, arg-overrides*, check*, lookup-yml*, missing-config*, specify-yml* ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx
with:
install: true
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run test group with run type
run: |
echo "Scenario: ${{ matrix.scenario }}"
echo "Parameters: ${{ matrix.parameters }}"
.integration-scenarios/debian-12-jar-mvn/run.sh -b ${{ matrix.runtype }} -t ${{ matrix.testgroup }}