Skip to content

Commit 317c372

Browse files
committed
improve the build-docs smoke test check
1 parent 68acaa9 commit 317c372

File tree

3 files changed

+337
-13
lines changed

3 files changed

+337
-13
lines changed

.github/workflows/smoke.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,14 @@ jobs:
296296
docker run --rm -v $PWD:/spec redocly/cli:latest lint openapi.yaml
297297
docker run --rm -v $PWD:/spec redocly/cli:latest bundle openapi.yaml --ext json
298298
docker run --rm -v $PWD:/spec redocly/cli:latest build-docs openapi.yaml
299-
# Check for broken styles (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
300-
if [[ "$(wc -l redoc-static.html)" == "324 redoc-static.html" ]]; then
301-
echo "Docs built correctly."
302-
else
303-
echo "Docs built incorrectly. Received lines: $(wc -l redoc-static.html) (expected 324 lines in redoc-static.html)."
304-
exit 1
305-
fi
299+
docker run --rm -v $PWD:/spec redocly/cli:latest split pets.yaml --outDir output/split/petstore && docker run --rm -v $PWD:/spec redocly/cli:latest split museum.yaml --outDir output/split/museum
300+
301+
# Check for broken styles when building docs (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
302+
echo "Checking docs for issues..."
303+
diff pre-built/redoc.html redoc-static.html
304+
echo "✅ Docs built correctly."
305+
306+
# Check for broken $refs (or other issues) in the split files, especially on Windows (it will fail on a difference)
307+
echo "Checking split files for issues..."
308+
diff -r pre-split output/split
309+
echo "✅ Files split correctly."

0 commit comments

Comments
 (0)