Skip to content

Commit

Permalink
add test for version bump in .nf-core.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mashehu committed Oct 14, 2024
1 parent 50027db commit 41c4b95
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/pipelines/test_bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,25 @@ def test_bump_pipeline_version(self):
"""Test that making a release with the working example files works"""

# Bump the version number
nf_core.pipelines.bump_version.bump_pipeline_version(self.pipeline_obj, "1.1")
nf_core.pipelines.bump_version.bump_pipeline_version(self.pipeline_obj, "1.1.0")
new_pipeline_obj = nf_core.utils.Pipeline(self.pipeline_dir)

# Check nextflow.config
new_pipeline_obj.load_pipeline_config()
assert new_pipeline_obj.nf_config["manifest.version"].strip("'\"") == "1.1"
assert new_pipeline_obj.nf_config["manifest.version"].strip("'\"") == "1.1.0"

# Check multiqc_config.yml
with open(new_pipeline_obj._fp("assets/multiqc_config.yml")) as fh:
multiqc_config = yaml.safe_load(fh)

assert "report_comment" in multiqc_config
assert "/releases/tag/1.1.0" in multiqc_config["report_comment"]

# Check .nf-core.yml
with open(new_pipeline_obj._fp(".nf-core.yml")) as fh:
nf_core_yml = yaml.safe_load(fh)
if nf_core_yml["template"]:
assert nf_core_yml["template"]["version"] == "1.1.0"

def test_dev_bump_pipeline_version(self):
"""Test that making a release works with a dev name and a leading v"""
Expand Down

0 comments on commit 41c4b95

Please sign in to comment.