Skip to content

Commit f49ede2

Browse files
committed
Add Docker image pre-pull for faster test execution
Pre-pull Docker images in both prepare-dependencies and individual test jobs: - Pre-pull all images in prepare-dependencies (documents requirements) - Pre-pull specific image in each test job before running tests Benefits: - Faster docker run (image already pulled, uses Docker layer cache) - Parallel pulls in prepare-dependencies don't block test jobs - Each test job pulls only what it needs - Docker layer caching speeds up subsequent pulls within same job This reduces Docker pull time from ~10-30s per test to near-instant if the image was already pulled (Docker layer cache hit).
1 parent a071ea8 commit f49ede2

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,22 @@ jobs:
103103
# Note: TiDB components are NOT pre-downloaded here to avoid huge cache timeout
104104
# Each test job will download and cache only the version it needs (~700-800MB per version)
105105

106+
- name: Pre-pull Docker images
107+
run: |
108+
# Pre-pull all Docker images used in tests
109+
# Note: Docker layer cache is ephemeral per job, but pre-pulling here documents
110+
# what images are needed and can help with local testing
111+
echo "Pre-pulling Docker images for MySQL, Percona, and MariaDB tests..."
112+
docker pull mysql:5.6 || true
113+
docker pull mysql:5.7 || true
114+
docker pull mysql:8.0 || true
115+
docker pull percona:5.7 || true
116+
docker pull percona:8.0 || true
117+
docker pull mariadb:10.3 || true
118+
docker pull mariadb:10.8 || true
119+
docker pull mariadb:10.10 || true
120+
echo "Docker images pre-pull complete (images will be pulled again in test jobs with layer caching)"
121+
106122
- name: Upload Terraform binary
107123
uses: actions/upload-artifact@v4
108124
with:

0 commit comments

Comments
 (0)