From 0479544e02354bbb0e775fab7f012a1d52ff896c Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Fri, 10 Jun 2022 09:46:14 +0000 Subject: [PATCH] Allow Git commit SHA's as version numbers --- tests/test_versions_yml.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_versions_yml.py b/tests/test_versions_yml.py index 5d0bb39e..60a083c4 100644 --- a/tests/test_versions_yml.py +++ b/tests/test_versions_yml.py @@ -16,9 +16,9 @@ def _get_workflow_names(): # test_config = yaml.safe_load(f.read_text()) test_config = yaml.load(f.read_text(), Loader=yaml.BaseLoader) for workflow in test_config: - # https://github.com/nf-core/modules/pull/1242 - added to cover tests + # https://github.com/nf-core/modules/pull/1242 - added to cover tests # that expect an error and therefore will not generate a versions.yml - if 'exit_code' not in workflow: + if 'exit_code' not in workflow: yield workflow["name"] @@ -56,5 +56,5 @@ def test_ensure_valid_version_yml(workflow_dir): assert len(software_versions), "There must be at least one version emitted." for tool, version in software_versions.items(): assert re.match( - r"^\d+.*", str(version) + r"(^\d+.*|^[a-z0-9]{40}$)", str(version) ), f"Version number for {tool} must start with a number. "