Skip to content

Commit 4a1fd33

Browse files
committed
ci: pre-pull Testcontainers images in worker before unit tests (#19464)
1 parent a207a68 commit 4a1fd33

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/worker.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,21 @@ jobs:
8686
echo "HASH=$(echo -n "${{ inputs.key }}" | sha256sum | cut -c-8)" >> $GITHUB_ENV
8787
./.github/scripts/collect_jvm_diagnostics &
8888
89+
- name: Pre-pull Testcontainers images for unit tests
90+
if: ${{ contains(inputs.script, 'run_unit-tests') }}
91+
run: |
92+
set -eu
93+
for image in apache/kafka:4.2.0 postgres:16-alpine minio/minio:latest; do
94+
for attempt in 1 2 3; do
95+
if docker pull --quiet "$image"; then
96+
break
97+
fi
98+
echo "::warning ::docker pull $image failed (attempt $attempt); retrying in 10s"
99+
sleep 10
100+
done
101+
done
102+
timeout-minutes: 5
103+
89104
- name: 'Execute: ${{ inputs.script }}'
90105
run: ${{ inputs.script }}
91106
timeout-minutes: 60

0 commit comments

Comments
 (0)