Skip to content

Commit

Permalink
feat(integration-tests): Load all builder images
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelsJP committed Nov 17, 2024
1 parent 279f7dd commit 746bbe7
Showing 1 changed file with 44 additions and 11 deletions.
55 changes: 44 additions & 11 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ jobs:
file: ./ors-test-scenarios/src/test/resources/Builder.Dockerfile
tags: ors-test-scenarios-maven-builder:latest
target: ors-test-scenarios-maven-builder
cache-to: type=local,dest=/tmp/ors-test-scenarios-maven-builder-cache.tar,mode=min
cache-from: type=gha
cache-to: type=gha,mode=min
- name: Load ors-test-scenarios-jar-builder image
uses: docker/build-push-action@v6
with:
Expand All @@ -74,7 +75,8 @@ jobs:
file: ./ors-test-scenarios/src/test/resources/Builder.Dockerfile
tags: ors-test-scenarios-jar-builder:latest
target: ors-test-scenarios-jar-builder
cache-to: type=local,dest=/tmp/ors-test-scenarios-jar-builder-cache.tar,mode=min
cache-from: type=gha
cache-to: type=gha,mode=min
- name: Load ors-test-scenarios-war-builder image
uses: docker/build-push-action@v6
with:
Expand All @@ -83,7 +85,8 @@ jobs:
file: ./ors-test-scenarios/src/test/resources/Builder.Dockerfile
tags: ors-test-scenarios-war-builder:latest
target: ors-test-scenarios-war-builder
cache-to: type=local,dest=/tmp/ors-test-scenarios-war-builder-cache.tar,mode=min
cache-from: type=gha
cache-to: type=gha,mode=min
- name: Build shared graph
run: |
mvn -pl ors-test-scenarios -Dtest=utils.OneShotGraphBuilderTest\#oneShotGraphBuilder test \
Expand Down Expand Up @@ -132,9 +135,6 @@ jobs:
uses: actions/cache/restore@v4
with:
path: |
/tmp/ors-test-scenarios-maven-builder-cache.tar
/tmp/ors-test-scenarios-jar-builder-cache.tar
/tmp/ors-test-scenarios-war-builder-cache.tar
ors-test-scenarios/graphs-integrationtests
key: ${{ runner.os }}-ors-test-scenarios-builder-images-${{ needs.build-default-builder.outputs.builder_image_id }}
- name: Prepare the setup
Expand All @@ -143,11 +143,44 @@ jobs:
mvn -pl ors-test-scenarios clean install -q -DskipTests
# Prepare the Dockerfile for efficient caching with buildx
sed -i 's/RUN mvn dependency:go-offline -B -q/RUN --mount=type=cache,target=\/root\/.m2 mvn dependency:go-offline -B -q/' ors-test-scenarios/src/test/resources/Builder.Dockerfile
# Load the cached images
docker load -i /tmp/ors-test-scenarios-builder-cache.tar
docker load -i /tmp/ors-test-scenarios-maven-builder-cache.tar
docker load -i /tmp/ors-test-scenarios-jar-builder-cache.tar
docker load -i /tmp/ors-test-scenarios-war-builder-cache.tar
- name: Build ors-test-scenarios-builder
id: docker_build
uses: docker/build-push-action@v6
with:
context: .
push: false
load: true
file: ./ors-test-scenarios/src/test/resources/Builder.Dockerfile
tags: ors-test-scenarios-builder:latest
target: ors-test-scenarios-builder
cache-from: type=gha
- name: Load ors-test-scenarios-maven-builder image
uses: docker/build-push-action@v6
with:
context: .
load: true
file: ./ors-test-scenarios/src/test/resources/Builder.Dockerfile
tags: ors-test-scenarios-maven-builder:latest
target: ors-test-scenarios-maven-builder
cache-from: type=gha
- name: Load ors-test-scenarios-jar-builder image
uses: docker/build-push-action@v6
with:
context: .
load: true
file: ./ors-test-scenarios/src/test/resources/Builder.Dockerfile
tags: ors-test-scenarios-jar-builder:latest
target: ors-test-scenarios-jar-builder
cache-from: type=gha
- name: Load ors-test-scenarios-war-builder image
uses: docker/build-push-action@v6
with:
context: .
load: true
file: ./ors-test-scenarios/src/test/resources/Builder.Dockerfile
tags: ors-test-scenarios-war-builder:latest
target: ors-test-scenarios-war-builder
cache-from: type=gha
- name: Run integration tests
run: |
# List the cached images
Expand Down

0 comments on commit 746bbe7

Please sign in to comment.