diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index fc20899..60f4cea 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -41,9 +41,9 @@ jobs: working-directory: frontend - run: docker compose build - run: docker compose down -v --remove-orphans - - run: docker compose up -d + - run: docker compose up -d --wait - name: Run Playwright tests - run: npx playwright test + run: npx playwright test --fail-on-flaky-tests --trace=retain-on-failure working-directory: frontend - run: docker compose down -v --remove-orphans - uses: actions/upload-artifact@v4 diff --git a/backend/app/api/routes/utils.py b/backend/app/api/routes/utils.py index 82f6d2b..a73b80d 100644 --- a/backend/app/api/routes/utils.py +++ b/backend/app/api/routes/utils.py @@ -24,3 +24,8 @@ def test_email(email_to: EmailStr) -> Message: html_content=email_data.html_content, ) return Message(message="Test email sent") + + +@router.get("/health-check/") +async def health_check() -> bool: + return True diff --git a/docker-compose.yml b/docker-compose.yml index d614942..3c2d79c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,6 +63,12 @@ services: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set} - SENTRY_DSN=${SENTRY_DSN} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost/api/v1/utils/health-check/"] + interval: 10s + timeout: 5s + retries: 5 + build: context: ./backend args: diff --git a/frontend/src/client/services.ts b/frontend/src/client/services.ts index b99e4ac..a7d58e9 100644 --- a/frontend/src/client/services.ts +++ b/frontend/src/client/services.ts @@ -386,6 +386,18 @@ export class UtilsService { }, }) } + + /** + * Health Check + * @returns boolean Successful Response + * @throws ApiError + */ + public static healthCheck(): CancelablePromise { + return __request(OpenAPI, { + method: "GET", + url: "/api/v1/utils/health-check/", + }) + } } export type TDataReadItems = {