Skip to content

Commit

Permalink
test(ors-test-scenarios): Test different caching
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelsJP committed Nov 12, 2024
1 parent 1b33a4d commit c5ce989
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
java-version: '17'
cache: 'maven'
cache-dependency-path: ./pom.xml
- name: Docker image cache
id: cached-image
uses: actions/cache@v4
with:
path: ors-test-scenarios-war-bare.tar
key: ${{ runner.os }}-ors-test-scenarios-war-bare
- 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: Restore cached ors docker test image
id: restore-cached-image
uses: actions/cache/restore@v4
with:
path: ors-test-scenarios-war-bare.tar
key: ${{ runner.os }}-ors-test-scenarios-war-bare
- name: Load the docker image if cache hit
if: steps.restore-cached-image.outputs.cache-hit == 'true'
if: steps.cached-image.outputs.cache-hit == 'true'
run: |
echo "Loading the docker image"
docker load -i ors-test-scenarios-war-bare.tar
Expand All @@ -50,11 +50,6 @@ jobs:
run: |
echo "Exporting the docker image"
docker save -o ors-test-scenarios-war-bare.tar ors-test-scenarios-war-bare:latest
- name: Save the docker image to the cache
uses: actions/cache/save@v4
with:
path: ors-test-scenarios-war-bare.tar
key: ${{ runner.os }}-ors-test-scenarios-war-bare-${{ hashFiles('ors-test-scenarios-war-bare.tar') }}
ors-test-scenarios:
name: Integration test suite
runs-on: ubuntu-latest
Expand All @@ -79,14 +74,14 @@ jobs:
id: buildx
with:
install: true
- name: Restore cached ors test image
id: restore-cached-image
uses: actions/cache/restore@v4
- name: Docker image cache
id: cached-image
uses: actions/cache@v4
with:
path: ors-test-scenarios-war-bare.tar
key: ${{ runner.os }}-ors-test-scenarios-war-bare
- name: Load the docker image
if: steps.restore-cached-image.outputs.cache-hit == 'true'
if: steps.cached-image.outputs.cache-hit == 'true'
run: |
echo "Loading the docker image"
docker load -i ors-test-scenarios-war-bare.tar
Expand Down

0 comments on commit c5ce989

Please sign in to comment.