From 172b7c45283131a81f5a939b20072db3b3fd1692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Wo=C5=BAniak?= <17177420+wozniakpl@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:03:42 +0200 Subject: [PATCH] wait for db --- .github/workflows/ci.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a6f4c1..8edc0ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,8 +28,14 @@ jobs: run: | python -m pip install pdm pdm install - - name: Run tests + ls -la ./ + - name: Start db + run: docker compose run --rm -d db + - name: Wait for db run: | - docker compose run --rm -d db - nc --help - pdm run pytest + for i in {1..30}; do + nc -zv localhost 5432 && break + sleep 1 + done + - name: Run tests + run: pdm run pytest