Skip to content

Commit 5c30bfd

Browse files
committed
Smoke test viz preview after deploy
1 parent b989bfa commit 5c30bfd

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/preview-viz.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,23 @@ jobs:
4848
--name viz \
4949
--message "${{ github.sha }}" \
5050
--json
51+
- name: Smoke test deployed Preview
52+
run: |
53+
set -euo pipefail
54+
base="https://viz-pythonbyexample.adewale-883.workers.dev"
55+
for path in \
56+
"/" \
57+
"/examples/values" \
58+
"/prototyping/journey-figures-gestalt"; do
59+
url="${base}${path}"
60+
echo "Checking ${url}"
61+
curl --fail --show-error --silent --location --output /tmp/preview-smoke.html --write-out "%{http_code} %{url_effective}\n" "${url}"
62+
if grep -qiE "error code: 1101|PythonError|Traceback" /tmp/preview-smoke.html; then
63+
echo "Preview rendered an exception for ${url}"
64+
head -200 /tmp/preview-smoke.html
65+
exit 1
66+
fi
67+
done
5168
- name: Dump wrangler logs on failure
5269
if: failure()
5370
run: |

0 commit comments

Comments
 (0)