From b66a16339321f341c3a0cff5ea7afd2d6b84ecd4 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Wed, 26 Apr 2023 15:01:36 +0200 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76ed0713..6f6c46f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,14 +45,26 @@ jobs: services: postgres: - image: postgres:latest - env: - POSTGRES_PASSWORD: 'postgres' - POSTGRES_USER: 'postgres' - POSTGRES_DB: main + image: 'postgres:latest' ports: - - 5432/tcp - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 + - '5432/tcp' + environment: + PGPASSWORD: '${POSTGRES_PASSWORD:-postgres}' + PGPORT: '${POSTGRES_PORT:-5432}' + POSTGRES_DB: main + POSTGRES_USER: '${POSTGRES_USER:-postgres}' + POSTGRES_PASSWORD: '${POSTGRES_PASSWORD:-postgres}' + healthcheck: + test: + - CMD + - pg_isready + - '-q' + - '-d' + - '${DB_DATABASE}' + - '-U' + - '${DB_USERNAME}' + retries: 3 + timeout: 5s mysql: image: mysql:5.7