From 595dc3da549030a9903ce9f86c2aacda48f0a82a Mon Sep 17 00:00:00 2001 From: Ashton Eby Date: Tue, 17 Sep 2024 13:53:58 -0700 Subject: [PATCH] fix CI test runs in CI, the tests are run using docker-compose targeting ./concourse/tasks/integration.yml. for instance, to repro locally, i ran `docker-compose -f concourse/tasks/integration.yml run tests-310`. however, the faunadb container is brought up by the test's docker-compose stack because the tests depends_on the database container. but since the tests don't require the container to be healthy (merely existent), they fail well before the database container is up. --- concourse/tasks/integration.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/concourse/tasks/integration.yml b/concourse/tasks/integration.yml index 623d44a..3e0a4f0 100644 --- a/concourse/tasks/integration.yml +++ b/concourse/tasks/integration.yml @@ -21,7 +21,8 @@ services: image: python:3.10-alpine3.15 container_name: mytests-310 depends_on: - - faunadb + faunadb: + condition: service_healthy volumes: - "../../:/tmp/app" working_dir: "/tmp/app" @@ -37,7 +38,8 @@ services: image: python:3.9.5-alpine3.13 container_name: mytests-39 depends_on: - - faunadb + faunadb: + condition: service_healthy volumes: - "../../:/tmp/app" working_dir: "/tmp/app" @@ -53,7 +55,8 @@ services: image: python:3.8.12-alpine3.13 container_name: mytests-38 depends_on: - - faunadb + faunadb: + condition: service_healthy volumes: - "../../:/tmp/app" working_dir: "/tmp/app" @@ -69,7 +72,8 @@ services: image: python:3.7.11-alpine3.13 container_name: mytests-37 depends_on: - - faunadb + faunadb: + condition: service_healthy volumes: - "../../:/tmp/app" working_dir: "/tmp/app" @@ -85,7 +89,8 @@ services: image: python:3.6.14-alpine3.13 container_name: mytests-36 depends_on: - - faunadb + faunadb: + condition: service_healthy volumes: - "../../:/tmp/app" working_dir: "/tmp/app"