Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/scheduled_unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ jobs:
run: |
git config --global user.name "Github Action"
git config --global user.email "[email protected]"
uv sync --upgrade
uv run pytest

4 changes: 2 additions & 2 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ jobs:
name: Run unit tests
runs-on: ${{ matrix.os }}
env:
USING_COVERAGE: '3.10'
USING_COVERAGE: '3.12'
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@master

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unittests_codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
name: Run unit tests with codecov upload
runs-on: ${{ matrix.os }}
env:
USING_COVERAGE: '3.10'
USING_COVERAGE: '3.12'
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@master

Expand Down
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ license = { text = "MIT" }
description="Mkdocs plugin that enables displaying the localized date of the last git modification of a markdown file."
readme = { file = "README.md", content-type = "text/markdown" }

requires-python=">=3.8"
requires-python=">=3.9"

classifiers=[
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License",
]

Expand All @@ -36,7 +35,7 @@ dependencies = [
"babel>=2.7.0",
"gitpython>=3.1.44",
"mkdocs>=1.0",
"pytz>=2025.1",
"tzdata>=2023.3; sys_platform == 'win32'",
]

[project.urls]
Expand Down Expand Up @@ -119,7 +118,7 @@ dev-dependencies = [
"mkdocs-gen-files>=0.5.0",
"mkdocs-git-authors-plugin>=0.9.2",
"mkdocs-material>=9.6.7",
"mkdocs-techdocs-core",
"mkdocs-techdocs-core>=1.0.0",
"mkdocs-monorepo-plugin>=1.1.0",
"mkdocs-static-i18n>=1.3.0",
"pytest>=8.3.5",
Expand Down
12 changes: 6 additions & 6 deletions tests/test_builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def validate_mkdocs_file(temp_path: str, mkdocs_yml_file: str):
testproject_path = setup_clean_mkdocs_folder(mkdocs_yml_path=mkdocs_yml_file, output_path=temp_path)
setup_commit_history(testproject_path)
result = build_docs_setup(testproject_path)
assert result.exit_code == 0, f"'mkdocs build' command failed with output:\n{result.stdout}"
assert result.exit_code == 0, f"'mkdocs build' command failed with output:\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"

# validate build with locale retrieved from mkdocs config file
validate_build(testproject_path, plugin_config=get_plugin_config_from_mkdocs(mkdocs_yml_file))
Expand Down Expand Up @@ -376,7 +376,7 @@ def test_tags_are_replaced(tmp_path, mkdocs_file):
testproject_path = setup_clean_mkdocs_folder(mkdocs_yml_path=f"tests/fixtures/{mkdocs_file}", output_path=tmp_path)
setup_commit_history(testproject_path)
result = build_docs_setup(testproject_path)
assert result.exit_code == 0, "'mkdocs build' command failed"
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"

plugin_config = get_plugin_config_from_mkdocs(str(testproject_path / "mkdocs.yml"))
tags_file = testproject_path / "site/page_with_tag/index.html"
Expand Down Expand Up @@ -647,7 +647,7 @@ def test_mkdocs_genfiles_plugin(tmp_path):
)
setup_commit_history(testproject_path)
result = build_docs_setup(testproject_path)
assert result.exit_code == 0, f"'mkdocs build' command failed with {result.stdout}"
assert result.exit_code == 0, f"'mkdocs build' command failed with {result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"

# validate the build
plugin_config = get_plugin_config_from_mkdocs(str(testproject_path / "mkdocs.yml"))
Expand Down Expand Up @@ -691,22 +691,22 @@ def test_monorepo_compat(tmp_path):
testproject_path = setup_clean_mkdocs_folder("tests/fixtures/monorepo/mkdocs.yml", tmp_path)
setup_commit_history(testproject_path)
result = build_docs_setup(testproject_path)
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}"
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"

@pytest.mark.skipif(sys.platform.startswith("win"), reason="monorepo plugin did not work for me on windows (even without this plugin)")
def test_monorepo_compat_reverse_order(tmp_path):
testproject_path = setup_clean_mkdocs_folder("tests/fixtures/monorepo/mkdocs_reverse_order.yml", tmp_path)
setup_commit_history(testproject_path)
result = build_docs_setup(testproject_path)
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}"
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"


def test_genfiles_plugin(tmp_path):
testproject_path = setup_clean_mkdocs_folder("tests/fixtures/basic_project/mkdocs_plugin_genfiles.yml", tmp_path)
setup_commit_history(testproject_path)

result = build_docs_setup(testproject_path)
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}"
assert result.exit_code == 0, f"'mkdocs build' command failed with:\n\n{result.stdout}\nReplicate with 'cd {testproject_path} && uv run mkdocs build'"

page_with_tag = testproject_path / "site/foo/index.html"
contents = page_with_tag.read_text(encoding="utf8")
Expand Down
Loading