diff --git a/CHANGELOG.md b/CHANGELOG.md index 653f7cca6..c099d8360 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)) diff --git a/nf_core/pipeline-template/.github/workflows/ci.yml b/nf_core/pipeline-template/.github/workflows/ci.yml index f3a107384..dd86342e5 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 977b4255d..1df0fa74d 100644 --- a/nf_core/pipeline-template/.github/workflows/download_pipeline.yml +++ b/nf_core/pipeline-template/.github/workflows/download_pipeline.yml @@ -12,14 +12,6 @@ on: required: true default: "dev" pull_request: - types: - - opened - - edited - - synchronize - branches: - - main - - master - pull_request_target: branches: - main - master @@ -120,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 }} @@ -131,4 +124,11 @@ 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* + include-hidden-files: true{% endif %} diff --git a/nf_core/pipeline-template/.github/workflows/linting.yml b/nf_core/pipeline-template/.github/workflows/linting.yml index cfdbcc12a..21771001c 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] diff --git a/nf_core/pipelines/lint/actions_ci.py b/nf_core/pipelines/lint/actions_ci.py index 74f433ef8..35565da48 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 diff --git a/tests/pipelines/lint/test_actions_ci.py b/tests/pipelines/lint/test_actions_ci.py index 7319ce4b0..4484ac74d 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)