From 57cd123f4e5ef3793422350ecb08651745e4a08b Mon Sep 17 00:00:00 2001 From: Carlo Costino Date: Thu, 4 Jan 2024 12:37:34 -0500 Subject: [PATCH] Adding Redis for running the API Signed-off-by: Carlo Costino --- .github/workflows/checks.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ab1ee085e..8d981cb27 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -71,6 +71,16 @@ jobs: ports: # Maps tcp port 5432 on service container to the host - 5432:5432 + redis: + image: redis + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + # Maps tcp port 6379 on service container to the host + - 6379:6379 steps: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-project @@ -87,14 +97,16 @@ jobs: env: DATABASE_URL: postgresql://user:password@localhost:5432/test_notification_api SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api + REDIS_URL: redis://localhost:6379 NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} - name: Run API server working-directory: 'notifications-api' - run: make run-flask & + run: make run-procfile & env: DATABASE_URL: postgresql://user:password@localhost:5432/test_notification_api SQLALCHEMY_DATABASE_TEST_URI: postgresql://user:password@localhost:5432/test_notification_api + REDIS_URL: redis://localhost:6379 NOTIFY_E2E_TEST_EMAIL: ${{ secrets.NOTIFY_E2E_TEST_EMAIL }} NOTIFY_E2E_TEST_PASSWORD: ${{ secrets.NOTIFY_E2E_TEST_PASSWORD }} - name: Run Admin server