👷 Improve playwright CI job (#1335)
This commit is contained in:
4
.github/workflows/playwright.yml
vendored
4
.github/workflows/playwright.yml
vendored
@@ -41,9 +41,9 @@ jobs:
|
|||||||
working-directory: frontend
|
working-directory: frontend
|
||||||
- run: docker compose build
|
- run: docker compose build
|
||||||
- run: docker compose down -v --remove-orphans
|
- run: docker compose down -v --remove-orphans
|
||||||
- run: docker compose up -d
|
- run: docker compose up -d --wait
|
||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
run: npx playwright test
|
run: npx playwright test --fail-on-flaky-tests --trace=retain-on-failure
|
||||||
working-directory: frontend
|
working-directory: frontend
|
||||||
- run: docker compose down -v --remove-orphans
|
- run: docker compose down -v --remove-orphans
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
|
@@ -24,3 +24,8 @@ def test_email(email_to: EmailStr) -> Message:
|
|||||||
html_content=email_data.html_content,
|
html_content=email_data.html_content,
|
||||||
)
|
)
|
||||||
return Message(message="Test email sent")
|
return Message(message="Test email sent")
|
||||||
|
|
||||||
|
|
||||||
|
@router.get("/health-check/")
|
||||||
|
async def health_check() -> bool:
|
||||||
|
return True
|
||||||
|
@@ -63,6 +63,12 @@ services:
|
|||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set}
|
||||||
- SENTRY_DSN=${SENTRY_DSN}
|
- SENTRY_DSN=${SENTRY_DSN}
|
||||||
|
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "curl", "-f", "http://localhost/api/v1/utils/health-check/"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
|
||||||
build:
|
build:
|
||||||
context: ./backend
|
context: ./backend
|
||||||
args:
|
args:
|
||||||
|
@@ -386,6 +386,18 @@ export class UtilsService {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Health Check
|
||||||
|
* @returns boolean Successful Response
|
||||||
|
* @throws ApiError
|
||||||
|
*/
|
||||||
|
public static healthCheck(): CancelablePromise<boolean> {
|
||||||
|
return __request(OpenAPI, {
|
||||||
|
method: "GET",
|
||||||
|
url: "/api/v1/utils/health-check/",
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TDataReadItems = {
|
export type TDataReadItems = {
|
||||||
|
Reference in New Issue
Block a user