Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,39 @@ jobs:
- name: Repository Checkout
uses: actions/checkout@v4

# --- Testcontainers Docker image cache (mysql + ryuk) ---
- name: Create docker cache directory
run: mkdir -p /tmp/docker-cache

- name: Cache Testcontainers images
id: tc-image-cache
uses: actions/cache@v4
with:
path: /tmp/docker-cache
key: testcontainers-images-${{ runner.os }}-mysql8.0-ryuk0.12.0-v1
restore-keys: |
testcontainers-images-${{ runner.os }}-

- name: Pull and save Docker images (cache miss)
if: steps.tc-image-cache.outputs.cache-hit != 'true'
run: |
set -euo pipefail

docker pull mysql:8.0
docker save -o /tmp/docker-cache/mysql_8.0.tar mysql:8.0

docker pull testcontainers/ryuk:0.12.0
docker save -o /tmp/docker-cache/ryuk_0.12.0.tar testcontainers/ryuk:0.12.0

- name: Load cached Docker images (cache hit)
if: steps.tc-image-cache.outputs.cache-hit == 'true'
run: |
set -euo pipefail

docker load -i /tmp/docker-cache/mysql_8.0.tar
docker load -i /tmp/docker-cache/ryuk_0.12.0.tar
# --- End Testcontainers Docker image cache ---

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
Expand Down