mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-09 02:54:09 +00:00
ci: refactor to avoid triggering all tests on changes to docs
This commit is contained in:
@@ -10,7 +10,9 @@ here = Path(__file__).absolute().parent
|
||||
root = here.parent
|
||||
|
||||
|
||||
def test_rest_api_version():
|
||||
def test_rest_api_version_is_updated():
|
||||
"""Checks that the version in JupyterHub's REST API definition file
|
||||
(rest-api.yml) is matching the JupyterHub version."""
|
||||
version_py = root.joinpath("jupyterhub", "_version.py")
|
||||
rest_api_yaml = root.joinpath("docs", "source", "_static", "rest-api.yml")
|
||||
ns = {}
|
||||
@@ -25,13 +27,11 @@ def test_rest_api_version():
|
||||
assert jupyterhub_version == rest_api_version
|
||||
|
||||
|
||||
def test_restapi_scopes():
|
||||
def test_rest_api_rbac_scope_descriptions_are_updated():
|
||||
"""Checks that the RBAC scope descriptions in JupyterHub's REST API
|
||||
definition file (rest-api.yml) as can be updated by generate-scope-table.py
|
||||
matches what is committed."""
|
||||
run([sys.executable, "source/rbac/generate-scope-table.py"], cwd=here, check=True)
|
||||
run(
|
||||
['pre-commit', 'run', 'prettier', '--files', 'source/_static/rest-api.yml'],
|
||||
cwd=here,
|
||||
check=False,
|
||||
)
|
||||
run(
|
||||
[
|
||||
"git",
|
||||
|
Reference in New Issue
Block a user