From f9d18a31e7fdcaed4ea0719accf75faae4939b9d Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 29 May 2026 22:59:23 +0000 Subject: [PATCH 1/2] Initial commit with task details Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: https://github.com/link-foundation/python-ai-driven-development-pipeline-template/issues/12 --- .gitkeep | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitkeep diff --git a/.gitkeep b/.gitkeep new file mode 100644 index 0000000..68e62ab --- /dev/null +++ b/.gitkeep @@ -0,0 +1 @@ +# .gitkeep file auto-generated at 2026-05-29T22:59:23.162Z for PR creation at branch issue-12-2788671b9000 for issue https://github.com/link-foundation/python-ai-driven-development-pipeline-template/issues/12 \ No newline at end of file From 1e6e91379901652f6dc5af1a78953719f8f327f2 Mon Sep 17 00:00:00 2001 From: konard Date: Fri, 29 May 2026 23:03:00 +0000 Subject: [PATCH 2/2] test: guard docs workflow action pins --- .gitkeep | 1 - tests/test_workflows.py | 22 +++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) delete mode 100644 .gitkeep diff --git a/.gitkeep b/.gitkeep deleted file mode 100644 index 68e62ab..0000000 --- a/.gitkeep +++ /dev/null @@ -1 +0,0 @@ -# .gitkeep file auto-generated at 2026-05-29T22:59:23.162Z for PR creation at branch issue-12-2788671b9000 for issue https://github.com/link-foundation/python-ai-driven-development-pipeline-template/issues/12 \ No newline at end of file diff --git a/tests/test_workflows.py b/tests/test_workflows.py index 60a3bc7..9a327ef 100644 --- a/tests/test_workflows.py +++ b/tests/test_workflows.py @@ -38,6 +38,12 @@ def assert_action_pin_count( assert len(re.findall(pattern, workflow)) == count +def assert_action_pin_absent(workflow: str, action: str, version: str) -> None: + """Assert an outdated action reference is not used.""" + pattern = rf"uses:\s+{re.escape(action)}@{re.escape(version)}\b" + assert not re.search(pattern, workflow) + + def test_release_workflow_keeps_main_releases_running() -> None: """Main release runs must not be cancelled by follow-up pushes.""" workflow = read_workflow("release.yml") @@ -65,17 +71,27 @@ def test_release_workflow_jobs_have_explicit_timeouts() -> None: assert f"timeout-minutes: {timeout}" in block -def test_workflow_action_versions_are_current() -> None: - """Workflow actions should use the current major versions.""" +def test_release_workflow_action_versions_are_current() -> None: + """Release workflow actions should use the current major versions.""" release_workflow = read_workflow("release.yml") - docs_workflow = read_workflow("docs.yml") assert_action_pin_count(release_workflow, "actions/checkout", "v6", 7) assert_action_pin_count(release_workflow, "actions/upload-artifact", "v7", 1) assert_action_pin_count(release_workflow, "actions/download-artifact", "v7", 1) + +def test_docs_workflow_action_versions_are_current() -> None: + """Docs workflow actions should stay aligned with the current Pages stack.""" + docs_workflow = read_workflow("docs.yml") + assert_action_pin_count(docs_workflow, "actions/checkout", "v6", 1) assert_action_pin_count(docs_workflow, "actions/upload-artifact", "v7", 1) assert_action_pin_count(docs_workflow, "actions/configure-pages", "v6", 1) assert_action_pin_count(docs_workflow, "actions/upload-pages-artifact", "v5", 1) assert_action_pin_count(docs_workflow, "actions/deploy-pages", "v5", 1) + + assert_action_pin_absent(docs_workflow, "actions/checkout", "v4") + assert_action_pin_absent(docs_workflow, "actions/upload-artifact", "v4") + assert_action_pin_absent(docs_workflow, "actions/configure-pages", "v5") + assert_action_pin_absent(docs_workflow, "actions/upload-pages-artifact", "v3") + assert_action_pin_absent(docs_workflow, "actions/deploy-pages", "v4")