File tree Expand file tree Collapse file tree 3 files changed +341
-13
lines changed
Expand file tree Collapse file tree 3 files changed +341
-13
lines changed Original file line number Diff line number Diff line change @@ -291,15 +291,23 @@ jobs:
291291 run : docker build -t redocly/cli:latest .
292292 - name : Run docker image
293293 run : |
294+ # Prepare
295+ cp resources/pets.yaml resources/museum.yaml __tests__/smoke/
294296 cd __tests__/smoke/
297+
298+ # Run commands
295299 docker run --rm redocly/cli:latest --version
296300 docker run --rm -v $PWD:/spec redocly/cli:latest lint openapi.yaml
297301 docker run --rm -v $PWD:/spec redocly/cli:latest bundle openapi.yaml --ext json
298302 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
303+ 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
304+
305+ # Check for broken styles when building docs (related issue: https://github.com/Redocly/redocly-cli/issues/1073)
306+ echo "Checking docs for issues..."
307+ diff pre-built/redoc.html redoc-static.html
308+ echo "✅ Docs built correctly."
309+
310+ # Check for broken $refs (or other issues) in the split files, especially on Windows (it will fail on a difference)
311+ echo "Checking split files for issues..."
312+ diff -r pre-split output/split
313+ echo "✅ Files split correctly."
You can’t perform that action at this time.
0 commit comments