Skip to content

Commit

Permalink
Ignore missing ref errors for client docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclarke committed Mar 6, 2024
1 parent 816df92 commit be44b30
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
5 changes: 0 additions & 5 deletions docs/clients/js/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,3 @@ JavaScript
The documentation for the JavaScript client is automatically pulled
from https://github.com/edgedb/edgedb-js/tree/master/docs by the
build pipeline of the edgedb.com website.

.. Following are a list of references from the actual docs to keep CI happy
.. _edgedb-js-api-transaction:
.. _edgedb-js-qb:
17 changes: 16 additions & 1 deletion tests/test_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,6 @@ def test_doc_full_build(self):
sys.executable,
'-m', 'sphinx',
'-n',
'-W', # fail on warnings
'-b', 'xml',
'-q',
'-D', 'master_doc=index',
Expand All @@ -482,3 +481,19 @@ def test_doc_full_build(self):
f'STDOUT:\n{proc.stdout}\n\n'
f'STDERR:\n{proc.stderr}\n'
)

errors = []
ignored_errors = re.compile(
r'^.* WARNING: undefined label: edgedb-'
r'(python|js|go|dart|dotnet|elixir|java)-.*$'
)
for line in proc.stderr.splitlines():
if not ignored_errors.match(line):
errors.append(line)

if len(errors) > 0:
errors = '\n'.join(errors)
raise AssertionError(
f'Unable to build docs with Sphinx.\n\n'
f'{errors}\n\n'
)

0 comments on commit be44b30

Please sign in to comment.