Skip to content

Commit

Permalink
smoke test
Browse files Browse the repository at this point in the history
  • Loading branch information
teogeb committed Dec 9, 2024
1 parent f5938c9 commit e4741c9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/test-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ jobs:
- name: Build documentation
working-directory: ./docs
run: npm ci && npm run build
- name: API docs smoke test
working-directory: ./docs
run: ./api-docs-smoke-test.sh
10 changes: 10 additions & 0 deletions docs/api-docs-smoke-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

# If TypeDoc succeeds, it creates the directory with markdown files that Docusaurus uses to generate the API docs.
# If TypeDoc fails, Docusaurus ignores the error, builds the site without API docs, and the "npm run build"
# script still returns 0. This is why this separate smoke test is needed.

if [ ! -d "docs/usage/sdk/api" ]; then
echo 'No files in "docs/usage/sdk/api" directory. Maybe TypeDoc failed?'
exit 1
fi

0 comments on commit e4741c9

Please sign in to comment.