From e4f5cea50cd870cc6246ef778e1846dc4b8afeea Mon Sep 17 00:00:00 2001 From: BentiGorlich Date: Wed, 18 Dec 2024 09:22:04 +0100 Subject: [PATCH] Fix the host for redis and psql --- .env.test | 6 ++++-- .github/workflows/action.yaml | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.env.test b/.env.test index 30a953ffb..16a3792a9 100644 --- a/.env.test +++ b/.env.test @@ -6,8 +6,10 @@ PANTHER_APP_ENV=panther PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots # Mbin variables -DATABASE_URL="postgresql://mbin:ChangeThisPostgresPass@127.0.0.1:5433/mbin?serverVersion=16&charset=utf8" -REDIS_DNS=redis://123456789@127.0.0.1:6380 +DATABASE_HOST=127.0.0.1 +DATABASE_URL="postgresql://mbin:ChangeThisPostgresPass@${DATABASE_HOST}:5433/mbin?serverVersion=16&charset=utf8" +REDIS_HOST=127.0.0.1 +REDIS_DNS=redis://123456789@${REDIS_HOST}:6380 MAILER_DSN=null://default KBIN_JS_ENABLED=false KBIN_DEFAULT_LANG=en diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml index 5ff3af3db..95c6f1070 100644 --- a/.github/workflows/action.yaml +++ b/.github/workflows/action.yaml @@ -107,11 +107,13 @@ jobs: env: COMPOSER_CACHE_DIR: ${{ steps.composer-cache.outputs.dir }} SYMFONY_DEPRECATIONS_HELPER: disabled + DATABASE_HOST: postgres + REDIS_HOST: redis run: php bin/phpunit tests/Functional services: postgres: # Docker Hub image - image: postgres + image: postgres:16 # Provide the password for postgres env: POSTGRES_DB: mbin_test @@ -123,6 +125,9 @@ jobs: --health-interval 10s --health-timeout 5s --health-retries 5 + ports: + # Maps port 5433 on service container to the host + - 5433:5432 redis: # Docker Hub image image: redis @@ -133,7 +138,7 @@ jobs: --health-timeout 5s --health-retries 5 ports: - # Maps port 6379 on service container to the host + # Maps port 6380 on service container to the host - 6380:6379 audit-check: