From 74a34a94d45f4557d1521e55a68b03d7d835f7f1 Mon Sep 17 00:00:00 2001 From: NiceAesth Date: Sun, 21 Apr 2024 14:31:11 +0300 Subject: [PATCH 1/2] fix: wait for containers to be healthy before attempting to run tests --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4f72fe45..0e8d957e 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -58,7 +58,7 @@ jobs: run: docker build -t bancho:latest . - name: Start containers - run: docker-compose -f docker-compose.test.yml up -d bancho-test mysql-test redis-test + run: docker-compose -f docker-compose.test.yml up -d --wait --wait-timeout 30 bancho-test mysql-test redis-test - name: Run tests run: docker-compose -f docker-compose.test.yml exec -T bancho-test /srv/root/scripts/run-tests.sh From 80370b98f7a37acb233b4cb5e5eb84e4bd7c0178 Mon Sep 17 00:00:00 2001 From: NiceAesth Date: Sun, 21 Apr 2024 14:33:45 +0300 Subject: [PATCH 2/2] fix --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 0e8d957e..7401d20c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -58,10 +58,10 @@ jobs: run: docker build -t bancho:latest . - name: Start containers - run: docker-compose -f docker-compose.test.yml up -d --wait --wait-timeout 30 bancho-test mysql-test redis-test + run: docker compose -f docker-compose.test.yml up --detach --wait --wait-timeout 30 bancho-test mysql-test redis-test - name: Run tests - run: docker-compose -f docker-compose.test.yml exec -T bancho-test /srv/root/scripts/run-tests.sh + run: docker compose -f docker-compose.test.yml exec -T bancho-test /srv/root/scripts/run-tests.sh - name: Stop containers if: always()