From 69186e9a26513b9c3ab3d9f27b0d891286bda77b Mon Sep 17 00:00:00 2001 From: Anthony LC Date: Thu, 5 Dec 2024 23:10:25 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=BA(CI)=20wait=20for=20services=20to?= =?UTF-8?q?=20be=20ready?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We add a check to be sure all the services are ready before starting the e2e tests. --- .github/workflows/impress-frontend.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/impress-frontend.yml b/.github/workflows/impress-frontend.yml index 427b81bc..60c35696 100644 --- a/.github/workflows/impress-frontend.yml +++ b/.github/workflows/impress-frontend.yml @@ -96,6 +96,28 @@ jobs: - name: Install Playwright Browsers run: cd src/frontend/apps/e2e && yarn install-playwright chromium + # 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 services to be ready + run: | + printf "Minio check...\n" + dockerize -wait tcp://localhost:9000 -timeout 20s + printf "Keyclock check...\n" + dockerize -wait tcp://localhost:8080 -timeout 20s + printf "Server collaboration check...\n" + dockerize -wait tcp://localhost:4444 -timeout 20s + printf "Ngnix check...\n" + dockerize -wait tcp://localhost:8083 -timeout 20s + printf "DRF check...\n" + dockerize -wait tcp://localhost:8071 -timeout 20s + printf "Postgres Keyclock check...\n" + dockerize -wait tcp://localhost:5433 -timeout 20s + printf "Postgres back check...\n" + dockerize -wait tcp://localhost:15432 -timeout 20s + - name: Run e2e tests run: cd src/frontend/ && yarn e2e:test --project='chromium'