mirror of
https://github.com/Cian-H/invenio-config-iform.git
synced 2025-12-22 21:11:57 +00:00
Switched tests to be managed by package manager
This commit is contained in:
@@ -29,6 +29,11 @@ dependencies = [
|
|||||||
Homepage = "https://github.com/Cian-H/invenio-config-iform"
|
Homepage = "https://github.com/Cian-H/invenio-config-iform"
|
||||||
Issues = "https://github.com/Cian-H/invenio-config-iform/issues"
|
Issues = "https://github.com/Cian-H/invenio-config-iform/issues"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
test-docs = "scripts.test_docs:main"
|
||||||
|
test-code = "pytest:console_main"
|
||||||
|
test = "scripts.test:main"
|
||||||
|
|
||||||
[dependency-groups]
|
[dependency-groups]
|
||||||
tests = [
|
tests = [
|
||||||
"invenio-app>=1.5.0",
|
"invenio-app>=1.5.0",
|
||||||
@@ -118,6 +123,3 @@ output-dir = "invenio_config_iform/translations/"
|
|||||||
[tool.babel.update_catalog]
|
[tool.babel.update_catalog]
|
||||||
input-file = "invenio_config_iform/translations/messages.pot"
|
input-file = "invenio_config_iform/translations/messages.pot"
|
||||||
output-dir = "invenio_config_iform/translations/"
|
output-dir = "invenio_config_iform/translations/"
|
||||||
|
|
||||||
[tool.uv.sources]
|
|
||||||
invenio-config-iform = { workspace = true }
|
|
||||||
|
|||||||
26
run-tests.sh
26
run-tests.sh
@@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# Copyright (C) 2019-2020 CERN.
|
|
||||||
# Copyright (C) 2019-2020 Northwestern University.
|
|
||||||
# Copyright (C) 2020-2024 Graz University of Technology.
|
|
||||||
# Copyright (C) 2025 I-Form Advanced Research Manufacturing Research Centre.
|
|
||||||
#
|
|
||||||
# invenio-config-iform is free software; you can redistribute it and/or
|
|
||||||
# modify it under the terms of the MIT License; see LICENSE file for more
|
|
||||||
# details.
|
|
||||||
|
|
||||||
|
|
||||||
# Quit on errors
|
|
||||||
set -o errexit
|
|
||||||
|
|
||||||
# Quit on unbound symbols
|
|
||||||
set -o nounset
|
|
||||||
|
|
||||||
echo "Running ruff check..."
|
|
||||||
ruff check .
|
|
||||||
|
|
||||||
echo "Running sphinx check..."
|
|
||||||
python -m sphinx.cmd.build -qnN docs docs/_build/html
|
|
||||||
echo "Running tests..."
|
|
||||||
python -m pytest
|
|
||||||
19
scripts/test.py
Normal file
19
scripts/test.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2025 I-Form Advanced Manufacturing Research Centre.
|
||||||
|
#
|
||||||
|
# invenio-config-iform is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
|
# details.
|
||||||
|
|
||||||
|
"""Run all tests for this module consecutively."""
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from . import test_docs
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
"""Run tests for this module."""
|
||||||
|
test_docs.main()
|
||||||
|
pytest.console_main()
|
||||||
16
scripts/test_docs.py
Normal file
16
scripts/test_docs.py
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2025 I-Form Advanced Manufacturing Research Centre.
|
||||||
|
#
|
||||||
|
# invenio-config-iform is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the MIT License; see LICENSE file for more
|
||||||
|
# details.
|
||||||
|
|
||||||
|
"""A script for testing sphinx documentation building."""
|
||||||
|
|
||||||
|
from sphinx.cmd.build import main as build_docs
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
"""Attempt to build documentation."""
|
||||||
|
build_docs(["-nN", "docs", "docs/_build/html"])
|
||||||
Reference in New Issue
Block a user