Skip to content

Accept a bare pull_request: in the nf-test workflow trigger - #4441

Open
FelixKrueger wants to merge 1 commit into
nf-core:devfrom
FelixKrueger:fix/actions-nf-test-bare-pull-request
Open

Accept a bare pull_request: in the nf-test workflow trigger#4441
FelixKrueger wants to merge 1 commit into
nf-core:devfrom
FelixKrueger:fix/actions-nf-test-bare-pull-request

Conversation

@FelixKrueger

Copy link
Copy Markdown

actions_nf_test documents the expected trigger as a bare pull_request:, then fails when that subtree parses to None — which is exactly what a bare key gives, so the documented form is rejected. This tests for the key instead of its value, which is what test_actions_nf_test_fail_wrong_trigger already assumes: it pops the key entirely to provoke the failure. A test for the bare form comes with it.

I ran into this removing paths-ignore from a pipeline's nf-test.yml so that a required confirm-pass check could report on docs-only PRs — without that filter the workflow is skipped, the check never reports, and the PR is permanently blocked. Happy to add a CHANGELOG entry; dev has no unreleased section open yet so I left it alone.

Behaviour across the four trigger shapes (AI-assisted)
on: shape before after
template form, paths-ignore present pass pass
documented form, bare pull_request: fail pass
explicit types: [opened, …] pass pass
pull_request key absent (existing failure test) fail fail

So one case changes and the two existing tests are unaffected.

The rule documents the expected trigger as

    on:
        pull_request:
        release:
           types: [published]

then fails when that subtree parses to None, which is exactly what a bare key
gives -- so the documented form is rejected. Test for the key instead of its
value, which is what test_actions_nf_test_fail_wrong_trigger already assumes:
it pops the key entirely to provoke the failure.

Pipelines hit this when removing paths-ignore so that a required confirm-pass
check can report on docs-only PRs.
@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.18%. Comparing base (cb623e0) to head (05ca46e).

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant