Skip to content

Commit 343b64f

Browse files
Merge branch 'fastapi:master' into refactor-status-code
2 parents f726671 + 46ac6a3 commit 343b64f

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

.github/workflows/playwright.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ jobs:
4141
working-directory: frontend
4242
- run: docker compose build
4343
- run: docker compose down -v --remove-orphans
44-
- run: docker compose up -d
44+
- run: docker compose up -d --wait
4545
- name: Run Playwright tests
46-
run: npx playwright test
46+
run: npx playwright test --fail-on-flaky-tests --trace=retain-on-failure
4747
working-directory: frontend
4848
- run: docker compose down -v --remove-orphans
4949
- uses: actions/upload-artifact@v4

backend/app/api/routes/utils.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@ def test_email(email_to: EmailStr) -> Message:
2424
html_content=email_data.html_content,
2525
)
2626
return Message(message="Test email sent")
27+
28+
29+
@router.get("/health-check/")
30+
async def health_check() -> bool:
31+
return True

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ services:
6363
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
6464
- SENTRY_DSN=${SENTRY_DSN}
6565

66+
healthcheck:
67+
test: ["CMD", "curl", "-f", "http://localhost/api/v1/utils/health-check/"]
68+
interval: 10s
69+
timeout: 5s
70+
retries: 5
71+
6672
build:
6773
context: ./backend
6874
args:

frontend/src/client/services.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,18 @@ export class UtilsService {
386386
},
387387
})
388388
}
389+
390+
/**
391+
* Health Check
392+
* @returns boolean Successful Response
393+
* @throws ApiError
394+
*/
395+
public static healthCheck(): CancelablePromise<boolean> {
396+
return __request(OpenAPI, {
397+
method: "GET",
398+
url: "/api/v1/utils/health-check/",
399+
})
400+
}
389401
}
390402

391403
export type TDataReadItems = {

release-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
### Internal
1616

17+
* 👷 Improve playwright CI job. PR [#1335](https://github.com/fastapi/full-stack-fastapi-template/pull/1335) by [@patrick91](https://github.com/patrick91).
1718
* 👷 Update `issue-manager.yml`. PR [#1329](https://github.com/fastapi/full-stack-fastapi-template/pull/1329) by [@tiangolo](https://github.com/tiangolo).
1819
* 💚 Set `include-hidden-files` to `True` when using the `upload-artifact` GH action. PR [#1327](https://github.com/fastapi/full-stack-fastapi-template/pull/1327) by [@svlandeg](https://github.com/svlandeg).
1920
* 👷🏻 Auto-generate frontend client . PR [#1320](https://github.com/fastapi/full-stack-fastapi-template/pull/1320) by [@alejsdev](https://github.com/alejsdev).

0 commit comments

Comments
 (0)