From 3a31a66038ebb6e7fee4bc10da70265759f89cfe Mon Sep 17 00:00:00 2001 From: Syndesi Date: Wed, 29 Nov 2023 18:30:15 +0100 Subject: [PATCH] Change the way how CI tasks are waiting for Elasticsearch, ideally closes #197. --- .github/workflows/ci-test.yml | 15 +++------------ CHANGELOG.md | 1 + tests/ExampleGenerationCommand/docker-compose.yml | 6 ++++++ .../docker-compose.yml | 6 ++++++ tests/FeatureTests/docker-compose-neo4j-5.1.yml | 6 ++++++ tests/FeatureTests/docker-compose-neo4j-5.12.yml | 6 ++++++ tests/FeatureTests/docker-compose-neo4j-5.13.yml | 6 ++++++ 7 files changed, 34 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 880f2129..76e094a2 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -208,10 +208,7 @@ jobs: run: | chmod 777 test-feature-prepare docker load < /tmp/docker/api-dev-amd.tar.gz - docker compose -f ./tests/FeatureTests/docker-compose-${{ matrix.dockerCompose }}.yml up --quiet-pull -d - echo "waiting for containers to star tup (10s)" - sleep 10 - echo "finished waiting" + docker compose -f ./tests/FeatureTests/docker-compose-${{ matrix.dockerCompose }}.yml up --quiet-pull -d --wait docker exec ember-nexus-api bash -c "composer install --ignore-platform-req=php --quiet && composer test:feature" test-example-generation-controller: @@ -242,10 +239,7 @@ jobs: run: | chmod 777 test-feature-prepare docker load < /tmp/docker/api-dev-amd.tar.gz - docker compose -f ./tests/ExampleGenerationController/docker-compose.yml up --quiet-pull -d - echo "waiting for containers to star tup (10s)" - sleep 10 - echo "finished waiting" + docker compose -f ./tests/ExampleGenerationController/docker-compose.yml up --quiet-pull -d --wait docker exec ember-nexus-api bash -c "composer install --ignore-platform-req=php --quiet && composer test:example-generation-controller" @@ -277,8 +271,5 @@ jobs: run: | chmod 777 test-feature-command-prepare docker load < /tmp/docker/api-dev-amd.tar.gz - docker compose -f ./tests/ExampleGenerationCommand/docker-compose.yml up --quiet-pull -d - echo "waiting for containers to star tup (10s)" - sleep 10 - echo "finished waiting" + docker compose -f ./tests/ExampleGenerationCommand/docker-compose.yml up --quiet-pull -d --wait docker exec ember-nexus-api bash -c "composer install --ignore-platform-req=php --quiet && BACKUP_FOLDER_CAN_BE_RESET=1 composer test:example-generation-command" diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b250c5b..e19b86e7 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add parameters `page` and `pageSize` to documentation of collection endpoints, closes #189. ### Changed - Rename `_PartialUnifiedCollection` to `_PartialElementCollection`, closes #187. +- Change the way how CI tasks are waiting for Elasticsearch, ideally closes #197. ## 0.0.37 - 2023-11-24 ### Changed diff --git a/tests/ExampleGenerationCommand/docker-compose.yml b/tests/ExampleGenerationCommand/docker-compose.yml index 8ad23b51..99a47cc3 100644 --- a/tests/ExampleGenerationCommand/docker-compose.yml +++ b/tests/ExampleGenerationCommand/docker-compose.yml @@ -5,6 +5,12 @@ services: image: api:dev-amd expose: - "80" + depends_on: + - ember-nexus-neo4j + - ember-nexus-mongodb + - ember-nexus-elasticsearch + - ember-nexus-redis + - ember-nexus-rabbitmq volumes: - ../../:/var/www/html diff --git a/tests/ExampleGenerationController/docker-compose.yml b/tests/ExampleGenerationController/docker-compose.yml index 8ad23b51..99a47cc3 100644 --- a/tests/ExampleGenerationController/docker-compose.yml +++ b/tests/ExampleGenerationController/docker-compose.yml @@ -5,6 +5,12 @@ services: image: api:dev-amd expose: - "80" + depends_on: + - ember-nexus-neo4j + - ember-nexus-mongodb + - ember-nexus-elasticsearch + - ember-nexus-redis + - ember-nexus-rabbitmq volumes: - ../../:/var/www/html diff --git a/tests/FeatureTests/docker-compose-neo4j-5.1.yml b/tests/FeatureTests/docker-compose-neo4j-5.1.yml index 4af5d134..b7171053 100644 --- a/tests/FeatureTests/docker-compose-neo4j-5.1.yml +++ b/tests/FeatureTests/docker-compose-neo4j-5.1.yml @@ -5,6 +5,12 @@ services: image: api:dev-amd expose: - "80" + depends_on: + - ember-nexus-neo4j + - ember-nexus-mongodb + - ember-nexus-elasticsearch + - ember-nexus-redis + - ember-nexus-rabbitmq volumes: - ../../:/var/www/html diff --git a/tests/FeatureTests/docker-compose-neo4j-5.12.yml b/tests/FeatureTests/docker-compose-neo4j-5.12.yml index 5145b01d..86f4577a 100644 --- a/tests/FeatureTests/docker-compose-neo4j-5.12.yml +++ b/tests/FeatureTests/docker-compose-neo4j-5.12.yml @@ -5,6 +5,12 @@ services: image: api:dev-amd expose: - "80" + depends_on: + - ember-nexus-neo4j + - ember-nexus-mongodb + - ember-nexus-elasticsearch + - ember-nexus-redis + - ember-nexus-rabbitmq volumes: - ../../:/var/www/html diff --git a/tests/FeatureTests/docker-compose-neo4j-5.13.yml b/tests/FeatureTests/docker-compose-neo4j-5.13.yml index 603e0c0d..1d1dc715 100644 --- a/tests/FeatureTests/docker-compose-neo4j-5.13.yml +++ b/tests/FeatureTests/docker-compose-neo4j-5.13.yml @@ -5,6 +5,12 @@ services: image: api:dev-amd expose: - "80" + depends_on: + - ember-nexus-neo4j + - ember-nexus-mongodb + - ember-nexus-elasticsearch + - ember-nexus-redis + - ember-nexus-rabbitmq volumes: - ../../:/var/www/html