Skip to content

Commit adf1b42

Browse files
committed
Pull docker image beforehand
1 parent 7d14be9 commit adf1b42

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ jobs:
6666
test-integration:
6767
name: Integration Tests (${{ matrix.os }})
6868
runs-on: ${{ matrix.os }}
69+
env:
70+
LOCALSTACK_IMAGE: localstack/localstack-pro:latest
6971
strategy:
7072
fail-fast: false
7173
matrix:
@@ -82,6 +84,25 @@ jobs:
8284
go.sum
8385
test/integration/go.sum
8486
87+
- name: Cache Docker image
88+
id: cache-docker
89+
uses: actions/cache@v4
90+
with:
91+
path: /tmp/localstack-image.tar
92+
key: docker-${{ env.LOCALSTACK_IMAGE }}-${{ runner.os }}
93+
94+
- name: Load cached Docker image
95+
if: steps.cache-docker.outputs.cache-hit == 'true'
96+
run: docker load -i /tmp/localstack-image.tar
97+
continue-on-error: true
98+
99+
- name: Pull and cache Docker image
100+
if: steps.cache-docker.outputs.cache-hit != 'true'
101+
run: |
102+
docker pull $LOCALSTACK_IMAGE
103+
docker save $LOCALSTACK_IMAGE -o /tmp/localstack-image.tar
104+
continue-on-error: true
105+
85106
- name: Run integration tests
86107
run: make test-integration
87108
env:

0 commit comments

Comments
 (0)