Skip to content

fix: repair workflows integrationtests docker #453

fix: repair workflows integrationtests docker

fix: repair workflows integrationtests docker #453

# 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", "feat/**" ]
pull_request:
branches: [ "main", "feat/**" ]
jobs:
build-caches:
name: Build with Maven and Docker caches
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
cache-dependency-path: ./pom.xml
- name: Cache Maven dependencies for the ors maven project
run: |
echo "Caching the maven dependencies"
mvn -pl ors-test-scenarios package -Dmaven.test.skip=true -B dependency:go-offline -q
- name: Download image
continue-on-error: true
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "ors-test-scenarios-war-bare:latest"
- name: Build the docker image with the one shot builder
run: |
echo "Building the docker image with the one shot builder"
mvn -pl ors-test-scenarios test
env:
ONE_SHOT_IMAGE_BUILDER: true
- name: Upload image
uses: ishworkh/container-image-artifact-upload@v2.0.0
with:
image: "ors-test-scenarios-war-bare:latest"
ors-test-scenarios:
name: Integration test suite
runs-on: ubuntu-latest
needs:
- build-caches
strategy:
matrix:
test_class: [ 'ConfigEnvironmentTest','ConfigFileTest','ConfigLookupTest','GeoToolsTest','GraphRepoTest' ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
cache-dependency-path: ./pom.xml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
- name: Download image
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "ors-test-scenarios-war-bare:latest"
- name: Run integration tests
run: |
echo "List all docker images"
docker image ls -a
echo "Running integration tests ${{ matrix.test_class }}"
mvn -pl ors-test-scenarios test -Dtest=${{ matrix.test_class }}