Skip to content

Commit

Permalink
Merge pull request #3399 from MatthiasZepper/download_action_trigger_…
Browse files Browse the repository at this point in the history
…refactor

Remove the on_pull_request_target trigger from the download test.
  • Loading branch information
MatthiasZepper authored Jan 29, 2025
2 parents 4c408c2 + 09b9e2a commit f332e85
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 18 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 0 additions & 3 deletions nf_core/pipeline-template/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ on:
required: true
default: "dev"
pull_request:
types:
- opened
- edited
- synchronize
branches:
- main
- master
pull_request_target:
branches:
- main
- master
Expand Down Expand Up @@ -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 }}
Expand All @@ -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 %}
3 changes: 0 additions & 3 deletions nf_core/pipeline-template/.github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 0 additions & 2 deletions nf_core/pipelines/lint/actions_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/pipelines/lint/test_actions_ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f332e85

Please sign in to comment.