This is an automated email from the ASF dual-hosted git repository.
junouyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git
The following commit(s) were added to refs/heads/main by this push:
new ebc579590 chore: add health check for docker-compose minio (#2899)
ebc579590 is described below
commit ebc579590ff6ef1198da018c6f24f78fd4386ae0
Author: oowl <[email protected]>
AuthorDate: Tue Aug 22 10:47:36 2023 +0800
chore: add health check for docker-compose minio (#2899)
* chore: add health check for docker-compose minio
* chore(ci): fix code
* chore(ci): fix code
* chore(ci): fix code
* chore(ci): fix code
* chore(ci): fix code
* chore(ci): fix code
* chore(ci): fix code
* chore(ci): fix code
* chore(ci): fix code
---
.github/workflows/service_test_s3.yml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/service_test_s3.yml
b/.github/workflows/service_test_s3.yml
index 8c12b6240..b83b89dd2 100644
--- a/.github/workflows/service_test_s3.yml
+++ b/.github/workflows/service_test_s3.yml
@@ -144,7 +144,13 @@ jobs:
- name: Setup MinIO Server
shell: bash
working-directory: core/src/services/s3/fixtures
- run: docker-compose -f docker-compose-minio.yml up -d
+ run: |
+ docker-compose -f docker-compose-minio.yml up -d
+ while :; do
+ echo "waiting minio docker to be ready"
+ [[ "$(curl -I http://127.0.0.1:9000/minio/health/live 2>/dev/null
| head -n 1 | cut -d$' ' -f2)" == "200" ]] && break
+ sleep 1
+ done
- name: Setup test bucket
run: |
curl -O https://dl.min.io/client/mc/release/linux-amd64/mc
@@ -152,6 +158,11 @@ jobs:
./mc alias set local http://127.0.0.1:9000/ minioadmin minioadmin
./mc mb local/test
./mc anonymous set public local/test
+ while :; do
+ echo "waiting minio to be ready"
+ [[ "$(./mc ping --count 1 local | awk '{print $6}' | tr -d '\n')"
== "errors=1" ]] || break
+ sleep 1
+ done
- name: Setup Rust toolchain
uses: ./.github/actions/setup
with: