mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
add healthcheck to playwright tests to wait for Mealie to be ready (not sure we need this)
This commit is contained in:
parent
7131fb855c
commit
1648ad4042
1 changed files with 16 additions and 0 deletions
16
.github/workflows/e2e.yml
vendored
16
.github/workflows/e2e.yml
vendored
|
@ -44,6 +44,22 @@ jobs:
|
|||
run: yarn playwright install --with-deps
|
||||
- name: Check test environment
|
||||
run: docker ps
|
||||
- name: Wait for application to be ready
|
||||
run: |
|
||||
echo "Waiting for Mealie to be ready..."
|
||||
for i in {1..60}; do
|
||||
if curl -f http://localhost:9000/login/ >/dev/null 2>&1; then
|
||||
echo "Mealie is ready!"
|
||||
break
|
||||
fi
|
||||
if [ $i -eq 60 ]; then
|
||||
echo "Timeout waiting for Mealie to be ready"
|
||||
docker logs mealie
|
||||
exit 1
|
||||
fi
|
||||
echo "Attempt $i/60: Mealie not ready yet, waiting 2 seconds..."
|
||||
sleep 2
|
||||
done
|
||||
- name: Run Playwright tests
|
||||
run: yarn playwright test
|
||||
- name: Destroy Test Environment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue