test: Integration test debian 12 tomcat systemd #16
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" ] | |
env: | |
TEST_IMAGE_NAME: 'local/tomcat-test:latest' | |
BUILD_PLATFORMS: 'linux/amd64' | |
jobs: | |
# This way the env variables are accessible in the individual jobs | |
prepare_environment: | |
name: Prepare the environment variables | |
runs-on: ubuntu-latest | |
outputs: | |
test_image_name: ${{ env.TEST_IMAGE_NAME }} | |
build_platforms: ${{ env.BUILD_PLATFORMS }} | |
steps: | |
- run: | | |
echo "Publish environment variables" | |
docker-build-cache: | |
name: Docker Buildx cache | |
runs-on: ubuntu-latest | |
needs: prepare_environment | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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 # m2 folder in the current repo root else it will not be available for the docker contexts | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Resolve missing dependencies | |
run: mvn clean packages -Dmaven.repo.local=./.m2 # don't use go-offline as it will create a weird subfolder structure | |
- name: Build image for platforms ${{ needs.prepare_environment.outputs.build_platforms }} | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: false | |
load: false | |
tags: ${{ needs.prepare_environment.outputs.test_image_name }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
file: ./.integration-scenarios/debian-12-tomcat-war-systemd/Dockerfile | |
# debian-12-tomcat-war-systemd: | |
# name: Run Debian 12 Tomcat WAR systemd integration tests | |
# runs-on: ubuntu-latest | |
# needs: | |
# - prepare_environment | |
# - docker-build-cache | |
# 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-maven-jar: | |
# name: Run Debian 12 Maven JAR integration tests | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# scenario: [ 'run.sh-call-01', 'run.sh-call-02' ] | |
# image: [ ubuntu-latest ] | |
# include: | |
# - scenario: 'run.sh-call-01' | |
# parameters: 'run.sh parameters-01' | |
# - scenario: 'run.sh-call-02' | |
# parameters: 'run.sh parameters-02' | |
# steps: | |
# # - name: Set up JDK 17 | |
# # uses: actions/setup-java@v2 | |
# # with: | |
# # distribution: 'temurin' | |
# # java-version: '17' | |
# - uses: actions/checkout@v2 | |
# with: | |
# fetch-depth: 0 | |
# - name: Cache Maven packages | |
# uses: actions/cache@v4 | |
# with: | |
# path: ~/.m2 | |
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
# restore-keys: ${{ runner.os }}-m2 | |
# - name: TBD | |
# run: | | |
# echo "Scenario: ${{ matrix.scenario }}" | |
# echo "Parameters: ${{ matrix.parameters }}" | |
# echo Implement me! |