snapshot of https://github.com/zulip/zulip.git @ 48c69911c7dd4e03b20552eb3bd77ad8151c1357 (2026-09-15)
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
Some checks failed
Code scanning / CodeQL (push) Failing after 15s
Zulip production suite / Ubuntu 22.04 production build (push) Failing after 26s
Zulip production suite / Debian 12 production install with custom db name and user (push) Has been skipped
Zulip production suite / Ubuntu 22.04 production install and PostgreSQL upgrade with pgroonga (push) Has been skipped
Zulip production suite / Ubuntu 24.04 production install (push) Has been skipped
Zulip production suite / Ubuntu 26.04 production install (push) Has been skipped
Zulip production suite / Debian 13 production install (push) Has been skipped
Zulip production suite / 7.0 Version Upgrade (push) Has been skipped
Zulip production suite / 8.0 Version Upgrade (push) Has been skipped
Zulip production suite / 6.0 Version Upgrade (push) Has been skipped
Zulip production suite / 10.0 Version Upgrade (push) Has been skipped
Zulip production suite / 9.0 Version Upgrade (push) Has been skipped
Zulip production suite / 12.0 Version Upgrade (push) Has been skipped
Zulip production suite / 11.0 Version Upgrade (push) Has been skipped
GitHub Actions Security Analysis with zizmor / zizmor (push) Failing after 3s
Zulip CI / Debian 12 (Python 3.11, backend + documentation) (push) Failing after 26s
Zulip CI / Ubuntu 22.04 (Python 3.10, backend + frontend) (push) Failing after 3s
Zulip CI / Ubuntu 24.04 (Python 3.12, backend) (push) Failing after 25s
Zulip CI / Ubuntu 26.04 (Python 3.14, backend) (push) Failing after 25s
Zulip CI / Debian 13 (Python 3.13, backend) (push) Failing after 28s
Zulip production suite / Required jobs (push) Has been cancelled
Zulip CI / Required jobs (push) Has been cancelled
API Documentation Update Check / check-feature-level-updated (push) Has been cancelled
API Documentation Update Check / notify-if-api-docs-changed (push) Has been cancelled
This commit is contained in:
101
tools/test-help-documentation
Executable file
101
tools/test-help-documentation
Executable file
@@ -0,0 +1,101 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import contextlib
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
from collections.abc import Iterator
|
||||
|
||||
ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
os.chdir(ZULIP_PATH)
|
||||
sys.path.insert(0, ZULIP_PATH)
|
||||
|
||||
# check for the venv
|
||||
from tools.lib import sanity_check
|
||||
|
||||
sanity_check.check_venv(__file__)
|
||||
|
||||
from tools.lib.test_script import add_provision_check_override_param
|
||||
from tools.lib.test_server import test_server_running
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
add_provision_check_override_param(parser)
|
||||
parser.add_argument(
|
||||
"--skip-external-links",
|
||||
dest="skip_external_link_check",
|
||||
action="store_true",
|
||||
help="Skip checking of external links.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--help-center",
|
||||
dest="enable_help_center",
|
||||
action="store_true",
|
||||
help="Test help center generated as part of the astro build process. If this option is set to True, this script assumes that you already have performend the build step.",
|
||||
)
|
||||
options = parser.parse_args()
|
||||
|
||||
os.makedirs("var/help-documentation", exist_ok=True)
|
||||
|
||||
LOG_FILE = "var/help-documentation/server.log"
|
||||
external_host = "localhost:9981"
|
||||
|
||||
extra_args = []
|
||||
|
||||
if options.skip_external_link_check:
|
||||
extra_args += ["-a", "skip_external=set"]
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def vnu_servlet() -> Iterator[None]:
|
||||
with subprocess.Popen(
|
||||
[
|
||||
"java",
|
||||
"-cp",
|
||||
os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
"../node_modules/vnu-jar/build/dist/vnu.jar",
|
||||
),
|
||||
"-Dnu.validator.servlet.bind-address=127.0.0.1",
|
||||
"nu.validator.servlet.Main",
|
||||
"9988",
|
||||
]
|
||||
) as proc:
|
||||
yield
|
||||
proc.terminate()
|
||||
|
||||
|
||||
with (
|
||||
vnu_servlet(),
|
||||
test_server_running(
|
||||
options.skip_provision_check,
|
||||
external_host,
|
||||
log_file=LOG_FILE,
|
||||
dots=True,
|
||||
enable_help_center=options.enable_help_center,
|
||||
),
|
||||
):
|
||||
ret_help_doc = subprocess.call(
|
||||
["scrapy", "crawl_with_status", *extra_args, "help_documentation_crawler"],
|
||||
cwd="tools/documentation_crawler",
|
||||
)
|
||||
extra_args += ["-a", "validate_html=set"]
|
||||
ret_api_doc = subprocess.call(
|
||||
["scrapy", "crawl_with_status", *extra_args, "api_documentation_crawler"],
|
||||
cwd="tools/documentation_crawler",
|
||||
)
|
||||
ret_portico_doc = subprocess.call(
|
||||
["scrapy", "crawl_with_status", *extra_args, "portico_documentation_crawler"],
|
||||
cwd="tools/documentation_crawler",
|
||||
)
|
||||
|
||||
if ret_help_doc != 0 or ret_api_doc != 0 or ret_portico_doc != 0:
|
||||
print("\033[0;91m")
|
||||
print("Failed")
|
||||
print("\033[0m")
|
||||
else:
|
||||
print("\033[0;92m")
|
||||
print("Passed!")
|
||||
print("\033[0m")
|
||||
|
||||
|
||||
sys.exit(ret_help_doc or ret_api_doc or ret_portico_doc)
|
||||
Reference in New Issue
Block a user