Skip to content

Commit

Permalink
✅(CI) fix flaky test on MinIO initialized
Browse files Browse the repository at this point in the history
MinIO server need to be initialized before
running the job to configure MinIO.
We add a delay to wait for MinIO server to be ready.
  • Loading branch information
AntoLC committed Sep 24, 2024
1 parent 96ac1af commit e5425a4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/impress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
path: "src/backend/core/templates/mail"
key: mail-templates-${{ hashFiles('src/mail/mjml') }}

- name: Start Minio
- name: Start MinIO
run: |
docker pull minio/minio
docker run -d --name minio \
Expand All @@ -178,6 +178,15 @@ jobs:
-v /data/media:/data \
minio/minio server --console-address :9001 /data
# Tool to wait for a service to be ready
- name: Install Dockerize
run: |
curl -sSL https://github.com/jwilder/dockerize/releases/download/v0.8.0/dockerize-linux-amd64-v0.8.0.tar.gz | sudo tar -C /usr/local/bin -xzv
- name: Wait for MinIO to be ready
run: |
dockerize -wait tcp://localhost:9000 -timeout 10s
- name: Configure MinIO
run: |
MINIO=$(docker ps | grep minio/minio | sed -E 's/.*\s+([a-zA-Z0-9_-]+)$/\1/')
Expand Down

0 comments on commit e5425a4

Please sign in to comment.