From 890d94089e06639dd7fa8cc7e1a132e6853bf296 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Mon, 27 Jan 2020 11:16:56 +0100 Subject: [PATCH 1/3] CI Tests: Force package version to be dev --- tests/test_lint.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_lint.py b/tests/test_lint.py index 4fd8decae2..85d0e627dc 100644 --- a/tests/test_lint.py +++ b/tests/test_lint.py @@ -42,6 +42,10 @@ def pf(wd, path): # The additional tests passed for releases ADD_PASS_RELEASE = 1 +# The minimal working example expects a development release version +if 'dev' not in nf_core.__version__: + nf_core.__version__ = '{}dev'.format(nf_core.__version__) + class TestLint(unittest.TestCase): """Class for lint tests""" @@ -127,7 +131,7 @@ def test_config_variable_error(self): """Tests that config variable existence test falls over nicely with nextflow can't run""" bad_lint_obj = nf_core.lint.PipelineLint('/non/existant/path') bad_lint_obj.check_nextflow_config() - + def test_actions_wf_branch_pass(self): """Tests that linting for GitHub actions workflow for branch protection works for a good example""" lint_obj = nf_core.lint.PipelineLint(PATH_WORKING_EXAMPLE) @@ -135,7 +139,7 @@ def test_actions_wf_branch_pass(self): lint_obj.check_actions_branch_protection() expectations = {"failed": 0, "warned": 0, "passed": 2} self.assess_lint_status(lint_obj, **expectations) - + def test_actions_wf_branch_fail(self): """Tests that linting for Github actions workflow for branch protection fails for a bad example""" lint_obj = nf_core.lint.PipelineLint(PATH_FAILING_EXAMPLE) @@ -492,4 +496,4 @@ def test_pipeline_name_critical(self): critical_lint_obj.pipeline_name = 'Tools123' critical_lint_obj.check_pipeline_name() expectations = {"failed": 0, "warned": 2, "passed": 0} - self.assess_lint_status(critical_lint_obj, **expectations) \ No newline at end of file + self.assess_lint_status(critical_lint_obj, **expectations) From 103ca143be893c1ea213f4160dd71e528aedc5fc Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Mon, 27 Jan 2020 11:17:53 +0100 Subject: [PATCH 2/3] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41da8d2b7a..1d36ce90de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ * Lint for `Singularity` file [and remove it](https://github.com/nf-core/tools/issues/458) * Added linting of GitHub actions workflows `linting.yml`, `ci.yml` and `branch.yml` * Warn if pipeline name contains upper case letters or non alphabetical characters [#85](https://github.com/nf-core/tools/issues/85) +* Make CI tests of lint code pass for releases ### Template pipeline From 115e680c6c501e6b8896486b7b2ddba43ff4d7e4 Mon Sep 17 00:00:00 2001 From: Phil Ewels Date: Mon, 27 Jan 2020 11:27:12 +0100 Subject: [PATCH 3/3] Drop Travis CI tests for Py2k --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 26b28abab4..5508abc91b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ sudo: required language: python jdk: openjdk8 python: - - '2.7' - '3.5' - '3.6' - '3.7'