From 17176f2cba25fe0ba38b57ab04ba49de9ae7cc6c Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Wed, 15 Jan 2025 12:56:23 +0100 Subject: [PATCH 1/7] Remove the on_pull_request_target trigger from the download test. --- .../.github/workflows/download_pipeline.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index 977b4255dc..bb135cbfc6 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -14,15 +14,10 @@ on: pull_request: types: - opened - - edited - synchronize branches: - main - master - pull_request_target: - branches: - - main - - master env: NXF_ANSI_LOG: false From b9d61ce81a70b5bac38459ab0e1cb65622482513 Mon Sep 17 00:00:00 2001 From: nf-core-bot Date: Wed, 15 Jan 2025 12:06:31 +0000 Subject: [PATCH 2/7] [automated] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 653f7cca6e..f34870d343 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ - Allow `nf-core pipelines download -r` to download commits ([#3374](https://github.com/nf-core/tools/pull/3374)) - Fix faulty Download Test Action to ensure that setup and test run as one job and on the same runner ([#3389](https://github.com/nf-core/tools/pull/3389)) +- Remove the on_pull_request_target trigger from the download test. ([#3399](https://github.com/nf-core/tools/pull/3399)) ### Modules From 19febf1f44310ad6e0349a9bf10fff76c0ac242d Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Mon, 27 Jan 2025 18:35:39 +0100 Subject: [PATCH 3/7] Remove push triggers and pull request types from CI. --- CHANGELOG.md | 3 ++- nf_core/pipeline-template/.github/workflows/ci.yml | 3 --- .../pipeline-template/.github/workflows/download_pipeline.yml | 3 --- nf_core/pipeline-template/.github/workflows/linting.yml | 3 --- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f34870d343..c099d8360c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ ### Template +- Remove the on `pull_request_target` trigger and `pull_request` types from the download test. Also drop `push` triggers on other CI tests. ([#3399](https://github.com/nf-core/tools/pull/3399)) + ### Linting - Add linting for ifEmpty(null) ([#3411](https://github.com/nf-core/tools/pull/3411)) @@ -46,7 +48,6 @@ - Allow `nf-core pipelines download -r` to download commits ([#3374](https://github.com/nf-core/tools/pull/3374)) - Fix faulty Download Test Action to ensure that setup and test run as one job and on the same runner ([#3389](https://github.com/nf-core/tools/pull/3389)) -- Remove the on_pull_request_target trigger from the download test. ([#3399](https://github.com/nf-core/tools/pull/3399)) ### Modules diff --git a/nf_core/pipeline-template/.github/workflows/ci.yml b/nf_core/pipeline-template/.github/workflows/ci.yml index f3a1073843..dd86342e51 100644 --- a/nf_core/pipeline-template/.github/workflows/ci.yml +++ b/nf_core/pipeline-template/.github/workflows/ci.yml @@ -1,9 +1,6 @@ name: nf-core CI # {% raw %}This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors on: - push: - branches: - - dev pull_request: release: types: [published] diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index bb135cbfc6..a3ac33d579 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -12,9 +12,6 @@ on: required: true default: "dev" pull_request: - types: - - opened - - synchronize branches: - main - master diff --git a/nf_core/pipeline-template/.github/workflows/linting.yml b/nf_core/pipeline-template/.github/workflows/linting.yml index cfdbcc12a9..21771001c2 100644 --- a/nf_core/pipeline-template/.github/workflows/linting.yml +++ b/nf_core/pipeline-template/.github/workflows/linting.yml @@ -3,9 +3,6 @@ name: nf-core linting # It runs the `nf-core pipelines lint` and markdown lint tests to ensure # that the code meets the nf-core guidelines. {%- raw %} on: - push: - branches: - - dev pull_request: release: types: [published] From e1591ae212f387f1fd299791aa49039dd28d09d2 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Tue, 28 Jan 2025 09:48:33 +0100 Subject: [PATCH 4/7] remove push event from GHA linting --- nf_core/pipelines/lint/actions_ci.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/nf_core/pipelines/lint/actions_ci.py b/nf_core/pipelines/lint/actions_ci.py index 74f433ef80..35565da482 100644 --- a/nf_core/pipelines/lint/actions_ci.py +++ b/nf_core/pipelines/lint/actions_ci.py @@ -55,8 +55,6 @@ def actions_ci(self): # Check that the action is turned on for the correct events try: # NB: YAML dict key 'on' is evaluated to a Python dict key True - if "dev" not in ciwf[True]["push"]["branches"]: - raise AssertionError() pr_subtree = ciwf[True]["pull_request"] if not ( pr_subtree is None From 722514d9fec28275c06ca99a2bc71859d4c644d7 Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Tue, 28 Jan 2025 16:39:40 +0100 Subject: [PATCH 5/7] Add additional step to Download action to get easy access to the Nextflow logfile for debugging. --- .../.github/workflows/download_pipeline.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index a3ac33d579..fae344e04c 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -112,6 +112,7 @@ jobs: echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT" - name: Compare container image counts + id: count_comparison run: | if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }} @@ -123,4 +124,10 @@ jobs: exit 1 else echo "The pipeline can be downloaded successfully!" - fi{% endraw %}{% endif %} + fi{% endraw %} + + - name: Upload Nextflow logfile for debugging purposes + uses: actions/upload-artifact@v4 + with: + name: nextflow_logfile.txt + path: .nextflow.log*{% endif %} From c81b818dd7510618cd72ed6781e5461201087318 Mon Sep 17 00:00:00 2001 From: Matthias Zepper Date: Tue, 28 Jan 2025 19:01:05 +0100 Subject: [PATCH 6/7] Include hidden files as well. --- .../pipeline-template/.github/workflows/download_pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml index fae344e04c..1df0fa74da 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -130,4 +130,5 @@ jobs: uses: actions/upload-artifact@v4 with: name: nextflow_logfile.txt - path: .nextflow.log*{% endif %} + path: .nextflow.log* + include-hidden-files: true{% endif %} From 09b9e2add67b241fd8d58e481dae573cbaa3ccb3 Mon Sep 17 00:00:00 2001 From: mirpedrol Date: Wed, 29 Jan 2025 11:07:01 +0100 Subject: [PATCH 7/7] fix test_actions_ci_fail_wrong_trigger test --- tests/pipelines/lint/test_actions_ci.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/pipelines/lint/test_actions_ci.py b/tests/pipelines/lint/test_actions_ci.py index 7319ce4b0c..4484ac74d9 100644 --- a/tests/pipelines/lint/test_actions_ci.py +++ b/tests/pipelines/lint/test_actions_ci.py @@ -34,7 +34,7 @@ def test_actions_ci_fail_wrong_trigger(self): new_pipeline = self._make_pipeline_copy() with open(Path(new_pipeline, ".github", "workflows", "ci.yml")) as fh: ci_yml = yaml.safe_load(fh) - ci_yml[True]["push"] = ["dev", "patch"] + ci_yml[True].pop("pull_request") ci_yml["jobs"]["test"]["strategy"]["matrix"] = {"nxf_versionnn": ["foo", ""]} with open(Path(new_pipeline, ".github", "workflows", "ci.yml"), "w") as fh: yaml.dump(ci_yml, fh)