Skip to content
Open
38 changes: 27 additions & 11 deletions .github/workflows/nf-test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
name: Run nf-test
on:
pull_request:
paths-ignore:
- "docs/**"
- "**/meta.yml"
- "**/*.md"
- "**/*.png"
- "**/*.svg"
Comment on lines -4 to -9
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you're changing this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see now.

Let's remove the' paths-ignore' part and the on: file-specific sections if that's not working for your docs PRs.

The reason we did that was to avoid spinning up a job just to check on those, but it makes sense if you're running into an actual CI requirement, and because this is RNAseq.

release:
types: [published]
workflow_dispatch:
Expand All @@ -33,6 +27,7 @@ jobs:
outputs:
shard: ${{ steps.set-shards.outputs.shard }}
total_shards: ${{ steps.set-shards.outputs.total_shards }}
skip_tests: ${{ steps.filter.outputs.skip_tests }}
steps:
- name: Clean Workspace # Purge the workspace in case it's running on a self-hosted runner
run: |
Expand All @@ -44,7 +39,20 @@ jobs:
with:
fetch-depth: 0

- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
id: filter
with:
predicate-quantifier: "every"
filters: |
skip_tests:
- 'docs/**'
- '**/meta.yml'
- '**/*.md'
- '**/*.png'
- '**/*.svg'

- name: get number of shards
if: steps.filter.outputs.skip_tests != 'true'
id: set-shards
uses: ./.github/actions/get-shards
env:
Expand All @@ -53,14 +61,15 @@ jobs:
max_shards: 14

- name: debug
if: steps.filter.outputs.skip_tests != 'true'
run: |
echo ${{ steps.set-shards.outputs.shard }}
echo ${{ steps.set-shards.outputs.total_shards }}

nf-test:
name: "${{ matrix.profile }} | ${{ matrix.NXF_VER }} | ${{ matrix.shard }}/${{ needs.nf-test-changes.outputs.total_shards }}"
needs: [nf-test-changes]
if: ${{ needs.nf-test-changes.outputs.total_shards != '0' }}
if: ${{ needs.nf-test-changes.outputs.skip_tests != 'true' && needs.nf-test-changes.outputs.total_shards != '0' }}
runs-on: # use self-hosted runners
- runs-on=${{ github.run_id }}-nf-test
- runner=4cpu-linux-x64
Expand Down Expand Up @@ -121,22 +130,28 @@ jobs:
fi

confirm-pass:
needs: [nf-test]
needs: [nf-test-changes, nf-test]
if: always()
runs-on: # use self-hosted runners
- runs-on=${{ github.run_id }}-confirm-pass
- runner=2cpu-linux-x64
steps:
- name: Tests were skipped (docs/markdown only changes)
if: ${{ needs.nf-test-changes.outputs.skip_tests == 'true' }}
run: |
echo "Tests were skipped - only docs/markdown files changed"
exit 0

- name: One or more tests failed (excluding latest-everything)
if: ${{ contains(needs.*.result, 'failure') }}
if: ${{ needs.nf-test-changes.outputs.skip_tests != 'true' && contains(needs.*.result, 'failure') }}
run: exit 1

- name: One or more tests cancelled
if: ${{ contains(needs.*.result, 'cancelled') }}
if: ${{ needs.nf-test-changes.outputs.skip_tests != 'true' && contains(needs.*.result, 'cancelled') }}
run: exit 1

- name: All tests ok
if: ${{ contains(needs.*.result, 'success') }}
if: ${{ needs.nf-test-changes.outputs.skip_tests != 'true' && contains(needs.*.result, 'success') }}
run: exit 0

- name: debug-print
Expand All @@ -145,4 +160,5 @@ jobs:
echo "::group::DEBUG: `needs` Contents"
echo "DEBUG: toJSON(needs) = ${{ toJSON(needs) }}"
echo "DEBUG: toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}"
echo "DEBUG: skip_tests = ${{ needs.nf-test-changes.outputs.skip_tests }}"
echo "::endgroup::"
1 change: 1 addition & 0 deletions .nf-core.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
lint:
actions_nf_test: false
files_exist:
- conf/modules.config
files_unchanged:
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Special thanks to the following for their contributions to the release:
### Enhancements and fixes

- [PR #1608](https://github.com/nf-core/rnaseq/pull/1608) - Bump version after release 3.21.0
- [PR #1618](https://github.com/nf-core/rnaseq/pull/1618) - Fix CI: Ensure confirm-pass job runs for markdown-only PRs
- [PR #1617](https://github.com/nf-core/rnaseq/pull/1617) - Update bbmap/bbsplit module

## [[3.21.0](https://github.com/nf-core/rnaseq/releases/tag/3.21.0)] - 2025-09-18
Expand Down
Loading