Skip to content

Commit f332e85

Browse files
Merge pull request #3399 from MatthiasZepper/download_action_trigger_refactor
Remove the on_pull_request_target trigger from the download test.
2 parents 4c408c2 + 09b9e2a commit f332e85

File tree

6 files changed

+12
-18
lines changed

6 files changed

+12
-18
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### Template
66

7+
- 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))
8+
79
### Linting
810

911
- Add linting for ifEmpty(null) ([#3411](https://github.com/nf-core/tools/pull/3411))

nf_core/pipeline-template/.github/workflows/ci.yml

-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: nf-core CI
22
# {% raw %}This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
33
on:
4-
push:
5-
branches:
6-
- dev
74
pull_request:
85
release:
96
types: [published]

nf_core/pipeline-template/.github/workflows/download_pipeline.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,6 @@ on:
1212
required: true
1313
default: "dev"
1414
pull_request:
15-
types:
16-
- opened
17-
- edited
18-
- synchronize
19-
branches:
20-
- main
21-
- master
22-
pull_request_target:
2315
branches:
2416
- main
2517
- master
@@ -120,6 +112,7 @@ jobs:
120112
echo "IMAGE_COUNT_AFTER=$image_count" >> "$GITHUB_OUTPUT"
121113
122114
- name: Compare container image counts
115+
id: count_comparison
123116
run: |
124117
if [ "${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}" -ne "${{ steps.count_afterwards.outputs.IMAGE_COUNT_AFTER }}" ]; then
125118
initial_count=${{ steps.count_initial.outputs.IMAGE_COUNT_INITIAL }}
@@ -131,4 +124,11 @@ jobs:
131124
exit 1
132125
else
133126
echo "The pipeline can be downloaded successfully!"
134-
fi{% endraw %}{% endif %}
127+
fi{% endraw %}
128+
129+
- name: Upload Nextflow logfile for debugging purposes
130+
uses: actions/upload-artifact@v4
131+
with:
132+
name: nextflow_logfile.txt
133+
path: .nextflow.log*
134+
include-hidden-files: true{% endif %}

nf_core/pipeline-template/.github/workflows/linting.yml

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: nf-core linting
33
# It runs the `nf-core pipelines lint` and markdown lint tests to ensure
44
# that the code meets the nf-core guidelines. {%- raw %}
55
on:
6-
push:
7-
branches:
8-
- dev
96
pull_request:
107
release:
118
types: [published]

nf_core/pipelines/lint/actions_ci.py

-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ def actions_ci(self):
5555
# Check that the action is turned on for the correct events
5656
try:
5757
# NB: YAML dict key 'on' is evaluated to a Python dict key True
58-
if "dev" not in ciwf[True]["push"]["branches"]:
59-
raise AssertionError()
6058
pr_subtree = ciwf[True]["pull_request"]
6159
if not (
6260
pr_subtree is None

tests/pipelines/lint/test_actions_ci.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_actions_ci_fail_wrong_trigger(self):
3434
new_pipeline = self._make_pipeline_copy()
3535
with open(Path(new_pipeline, ".github", "workflows", "ci.yml")) as fh:
3636
ci_yml = yaml.safe_load(fh)
37-
ci_yml[True]["push"] = ["dev", "patch"]
37+
ci_yml[True].pop("pull_request")
3838
ci_yml["jobs"]["test"]["strategy"]["matrix"] = {"nxf_versionnn": ["foo", ""]}
3939
with open(Path(new_pipeline, ".github", "workflows", "ci.yml"), "w") as fh:
4040
yaml.dump(ci_yml, fh)

0 commit comments

Comments
 (0)