mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-13 05:13:09 +00:00
Merge pull request #1753 from mahesh-panchal/allow_git_sha_versions
Allow Git commit SHA's as version numbers
This commit is contained in:
commit
afed00fb62
1 changed files with 4 additions and 4 deletions
|
@ -16,9 +16,9 @@ def _get_workflow_names():
|
||||||
# test_config = yaml.safe_load(f.read_text())
|
# test_config = yaml.safe_load(f.read_text())
|
||||||
test_config = yaml.load(f.read_text(), Loader=yaml.BaseLoader)
|
test_config = yaml.load(f.read_text(), Loader=yaml.BaseLoader)
|
||||||
for workflow in test_config:
|
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
|
# 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"]
|
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."
|
assert len(software_versions), "There must be at least one version emitted."
|
||||||
for tool, version in software_versions.items():
|
for tool, version in software_versions.items():
|
||||||
assert re.match(
|
assert re.match(
|
||||||
r"^\d+.*", str(version)
|
r"^\d.*|^[a-f0-9]{40}$", str(version)
|
||||||
), f"Version number for {tool} must start with a number. "
|
), f"Version number for {tool} must start with a number, or be a Git SHA commit id. "
|
||||||
|
|
Loading…
Reference in a new issue