mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-07-17 17:21:48 +00:00
refactor: consolidate prober logic into shared helper and add test-testid attributes to core UI elements
This commit is contained in:
22
.github/workflows/prober-docker.yml
vendored
22
.github/workflows/prober-docker.yml
vendored
@@ -26,6 +26,12 @@ jobs:
|
||||
- name: Pull Docker image
|
||||
run: docker pull ghcr.io/pewu/topola-viewer:latest
|
||||
|
||||
- name: Record image digest
|
||||
run: |
|
||||
DIGEST=$(docker inspect --format='{{index .RepoDigests 0}}' ghcr.io/pewu/topola-viewer:latest)
|
||||
echo "Testing Docker image: $DIGEST"
|
||||
echo "::notice title=Docker Prober::Testing image $DIGEST"
|
||||
|
||||
- name: Run container
|
||||
run: |
|
||||
docker run -d -p 8080:8080 -e STATIC_URL=test.ged \
|
||||
@@ -33,14 +39,6 @@ jobs:
|
||||
--name topola-prober-${{ github.run_id }} \
|
||||
ghcr.io/pewu/topola-viewer:latest
|
||||
|
||||
- name: Wait for container to be ready
|
||||
run: |
|
||||
for i in $(seq 1 30); do
|
||||
if curl -sf -o /dev/null http://localhost:8080/; then break; fi
|
||||
sleep 1
|
||||
done
|
||||
curl -sf -o /dev/null http://localhost:8080/
|
||||
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
@@ -67,6 +65,14 @@ jobs:
|
||||
if: steps.cache-playwright.outputs.cache-hit != 'true'
|
||||
run: npx playwright install chromium
|
||||
|
||||
- name: Wait for container to be ready
|
||||
run: |
|
||||
for i in $(seq 1 30); do
|
||||
if curl -sf -o /dev/null http://localhost:8080/; then break; fi
|
||||
sleep 1
|
||||
done
|
||||
curl -sf -o /dev/null http://localhost:8080/
|
||||
|
||||
- name: Run prober
|
||||
env:
|
||||
PLAYWRIGHT_HTML_REPORT: playwright-report/prober
|
||||
|
||||
Reference in New Issue
Block a user