From f4ea1d41186e28f4d4aaa8f04c2825faa212548d Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 22:56:37 +0100 Subject: [PATCH 01/11] Create readme.md --- .github/actions/readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/actions/readme.md diff --git a/.github/actions/readme.md b/.github/actions/readme.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/actions/readme.md @@ -0,0 +1 @@ + From 73f972df68aa5fd1319339d7cd5d3aa98380d9f6 Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 22:57:02 +0100 Subject: [PATCH 02/11] Create readme.md --- .github/actions/nf-test/readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/actions/nf-test/readme.md diff --git a/.github/actions/nf-test/readme.md b/.github/actions/nf-test/readme.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/actions/nf-test/readme.md @@ -0,0 +1 @@ + From a32c540c03d895b38ce88df7e5498fa6e217d3fd Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 22:57:29 +0100 Subject: [PATCH 03/11] Create readme.md --- .github/actions/get-shards/readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/actions/get-shards/readme.md diff --git a/.github/actions/get-shards/readme.md b/.github/actions/get-shards/readme.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/actions/get-shards/readme.md @@ -0,0 +1 @@ + From 87c0c2b0cb00b5e98e4fc7d41fbeb3b9da52bc1f Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 22:58:08 +0100 Subject: [PATCH 04/11] Add files via upload --- .github/actions/nf-test/action.yml | 121 +++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 .github/actions/nf-test/action.yml diff --git a/.github/actions/nf-test/action.yml b/.github/actions/nf-test/action.yml new file mode 100644 index 0000000..49c8613 --- /dev/null +++ b/.github/actions/nf-test/action.yml @@ -0,0 +1,121 @@ +name: "nf-test Action" +description: "Runs nf-test with common setup steps" +inputs: + profile: + description: "Profile to use" + required: true + shard: + description: "Shard number for this CI job" + required: true + total_shards: + description: "Total number of test shards(NOT the total number of matrix jobs)" + required: true + paths: + description: "Test paths" + required: true + tags: + description: "Tags to pass as argument for nf-test --tag parameter" + required: false +runs: + using: "composite" + steps: + - name: Setup Nextflow + uses: nf-core/setup-nextflow@v2 + with: + version: "${{ env.NXF_VERSION }}" + + - name: Set up Python + uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6 + with: + python-version: "3.14" + + - name: Install nf-test + uses: nf-core/setup-nf-test@v1 + with: + version: "${{ env.NFT_VER }}" + install-pdiff: true + + - name: Setup apptainer + if: contains(inputs.profile, 'singularity') + uses: eWaterCycle/setup-apptainer@main + + - name: Set up Singularity + if: contains(inputs.profile, 'singularity') + shell: bash + run: | + mkdir -p $NXF_SINGULARITY_CACHEDIR + mkdir -p $NXF_SINGULARITY_LIBRARYDIR + + - name: Conda setup + if: contains(inputs.profile, 'conda') + uses: conda-incubator/setup-miniconda@505e6394dae86d6a5c7fbb6e3fb8938e3e863830 # v3 + with: + auto-update-conda: true + conda-solver: libmamba + channels: conda-forge + channel-priority: strict + conda-remove-defaults: true + + # Set up secrets + - name: Set up Nextflow secrets + if: env.SENTIEON_ENCRYPTION_KEY != '' && env.SENTIEON_LICENSE_MESSAGE != '' + shell: bash + run: | + python -m pip install cryptography + nextflow secrets set SENTIEON_AUTH_DATA $(python3 .github/actions/nf-test/license_message.py encrypt --key "$SENTIEON_ENCRYPTION_KEY" --message "$SENTIEON_LICENSE_MESSAGE") + + - name: Run nf-test + shell: bash + env: + NFT_WORKDIR: ${{ env.NFT_WORKDIR }} + SENTIEON_LICSRVR_IP: ${{ env.SENTIEON_LICSRVR_IP }} + SENTIEON_AUTH_MECH: "GitHub Actions - token" + run: | + nf-test test \ + --profile=+${{ inputs.profile }} \ + $(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \ + --ci \ + --changed-since HEAD^ \ + --verbose \ + --tap=test.tap \ + --shard ${{ inputs.shard }}/${{ inputs.total_shards }} + + # Save the absolute path of the test.tap file to the output + echo "tap_file_path=$(realpath test.tap)" >> $GITHUB_OUTPUT + + - name: Generate test summary + if: always() + shell: bash + run: | + # Add header if it doesn't exist (using a token file to track this) + if [ ! -f ".summary_header" ]; then + echo "# 🚀 nf-test results" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "| Status | Test Name | Profile | Shard |" >> $GITHUB_STEP_SUMMARY + echo "|:------:|-----------|---------|-------|" >> $GITHUB_STEP_SUMMARY + touch .summary_header + fi + + if [ -f test.tap ]; then + while IFS= read -r line; do + if [[ $line =~ ^ok ]]; then + test_name="${line#ok }" + # Remove the test number from the beginning + test_name="${test_name#* }" + echo "| ✅ | ${test_name} | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY + elif [[ $line =~ ^not\ ok ]]; then + test_name="${line#not ok }" + # Remove the test number from the beginning + test_name="${test_name#* }" + echo "| ❌ | ${test_name} | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY + fi + done < test.tap + else + echo "| ⚠️ | No test results found | ${{ inputs.profile }} | ${{ inputs.shard }}/${{ inputs.total_shards }} |" >> $GITHUB_STEP_SUMMARY + fi + + - name: Clean up + if: always() + shell: bash + run: | + sudo rm -rf /home/ubuntu/tests/ From e95bda7a57951e6abba1e7f96118e66c640cbb20 Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 22:59:07 +0100 Subject: [PATCH 05/11] Add files via upload --- .github/actions/get-shards/action.yml | 69 +++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/actions/get-shards/action.yml diff --git a/.github/actions/get-shards/action.yml b/.github/actions/get-shards/action.yml new file mode 100644 index 0000000..3408527 --- /dev/null +++ b/.github/actions/get-shards/action.yml @@ -0,0 +1,69 @@ +name: "Get number of shards" +description: "Get the number of nf-test shards for the current CI job" +inputs: + max_shards: + description: "Maximum number of shards allowed" + required: true + paths: + description: "Component paths to test" + required: false + tags: + description: "Tags to pass as argument for nf-test --tag parameter" + required: false +outputs: + shard: + description: "Array of shard numbers" + value: ${{ steps.shards.outputs.shard }} + total_shards: + description: "Total number of shards" + value: ${{ steps.shards.outputs.total_shards }} +runs: + using: "composite" + steps: + - name: Install nf-test + uses: nf-core/setup-nf-test@v1 + with: + version: ${{ env.NFT_VER }} + - name: Get number of shards + id: shards + shell: bash + run: | + # Run nf-test with dynamic parameter + nftest_output=$(nf-test test \ + --profile +docker \ + $(if [ -n "${{ inputs.tags }}" ]; then echo "--tag ${{ inputs.tags }}"; fi) \ + --dry-run \ + --ci \ + --changed-since HEAD^) || { + echo "nf-test command failed with exit code $?" + echo "Full output: $nftest_output" + exit 1 + } + echo "nf-test dry-run output: $nftest_output" + + # Default values for shard and total_shards + shard="[]" + total_shards=0 + + # Check if there are related tests + if echo "$nftest_output" | grep -q 'No tests to execute'; then + echo "No related tests found." + else + # Extract the number of related tests + number_of_shards=$(echo "$nftest_output" | sed -n 's|.*Executed \([0-9]*\) tests.*|\1|p') + if [[ -n "$number_of_shards" && "$number_of_shards" -gt 0 ]]; then + shards_to_run=$(( $number_of_shards < ${{ inputs.max_shards }} ? $number_of_shards : ${{ inputs.max_shards }} )) + shard=$(seq 1 "$shards_to_run" | jq -R . | jq -c -s .) + total_shards="$shards_to_run" + else + echo "Unexpected output format. Falling back to default values." + fi + fi + + # Write to GitHub Actions outputs + echo "shard=$shard" >> $GITHUB_OUTPUT + echo "total_shards=$total_shards" >> $GITHUB_OUTPUT + + # Debugging output + echo "Final shard array: $shard" + echo "Total number of shards: $total_shards" From 45ddfa41c9b3b819fd4e6d5f4e4e32f4c86bbeba Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 23:00:22 +0100 Subject: [PATCH 06/11] Add files via upload --- .github/workflows/nf-test.yml | 150 ++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100644 .github/workflows/nf-test.yml diff --git a/.github/workflows/nf-test.yml b/.github/workflows/nf-test.yml new file mode 100644 index 0000000..358f9c3 --- /dev/null +++ b/.github/workflows/nf-test.yml @@ -0,0 +1,150 @@ +name: Run nf-test +on: + pull_request: + release: + types: [published] + workflow_dispatch: + +# Cancel if a newer run is started +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NFT_VER: "0.9.3" + NFT_WORKDIR: "~" + NXF_ANSI_LOG: false + NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity + NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity + +jobs: + nf-test-changes: + name: nf-test-changes + runs-on: # use self-hosted runners + - runs-on=${{ github.run_id }}-nf-test-changes + - runner=4cpu-linux-x64 + outputs: + shard: ${{ steps.set-shards.outputs.shard }} + total_shards: ${{ steps.set-shards.outputs.total_shards }} + steps: + - name: Clean Workspace # Purge the workspace in case it's running on a self-hosted runner + run: | + ls -la ./ + rm -rf ./* || true + rm -rf ./.??* || true + ls -la ./ + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + + - name: get number of shards + id: set-shards + uses: ./.github/actions/get-shards + env: + NFT_VER: ${{ env.NFT_VER }} + # Skip sentieon tests on fork PRs where secrets are not available + SKIP_SENTIEON: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'nf-core/rnaseq' }} + # Skip parabricks/GPU tests on CPU runners + SKIP_PARABRICKS: "true" + with: + max_shards: 20 + + - name: debug + 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' }} + runs-on: # use self-hosted runners + - runs-on=${{ github.run_id }}-nf-test + - runner=4cpu-linux-x64 + strategy: + fail-fast: false + matrix: + shard: ${{ fromJson(needs.nf-test-changes.outputs.shard) }} + profile: [conda, docker, singularity] + isMain: + - ${{ github.base_ref == 'master' || github.base_ref == 'main' }} + # Exclude conda and singularity on dev + exclude: + - isMain: false + profile: "conda" + - isMain: false + profile: "singularity" + NXF_VER: + - "25.04.3" + - "latest-everything" + env: + NXF_ANSI_LOG: false + TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.total_shards }} + + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + + - name: Run nf-test + id: run_nf_test + uses: ./.github/actions/nf-test + continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }} + env: + NFT_WORKDIR: ${{ env.NFT_WORKDIR }} + SENTIEON_AUTH_MECH: "GitHub Actions - token" + SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }} + SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }} + SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }} + NXF_VERSION: ${{ matrix.NXF_VER }} + # Skip sentieon tests on fork PRs where secrets are not available + SKIP_SENTIEON: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'nf-core/rnaseq' }} + # Skip parabricks/GPU tests on CPU runners + SKIP_PARABRICKS: "true" + with: + profile: test,${{ matrix.profile }} + shard: ${{ matrix.shard }} + total_shards: ${{ env.TOTAL_SHARDS }} + + - name: Report test status + if: ${{ always() }} + run: | + if [[ "${{ steps.run_nf_test.outcome }}" == "failure" ]]; then + echo "::error::Test with ${{ matrix.NXF_VER }} failed" + # Add to workflow summary + echo "## ❌ Test failed: ${{ matrix.profile }} | ${{ matrix.NXF_VER }} | Shard ${{ matrix.shard }}/${{ env.TOTAL_SHARDS }}" >> $GITHUB_STEP_SUMMARY + if [[ "${{ matrix.NXF_VER }}" == "latest-everything" ]]; then + echo "::warning::Test with latest-everything failed but will not cause workflow failure. Please check if the error is expected or if it needs fixing." + fi + if [[ "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then + exit 1 + fi + fi + + confirm-pass: + 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: One or more tests failed (excluding latest-everything) + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + + - name: One or more tests cancelled + if: ${{ contains(needs.*.result, 'cancelled') }} + run: exit 1 + + - name: All tests ok + if: ${{ contains(needs.*.result, 'success') }} + run: exit 0 + + - name: debug-print + if: always() + run: | + echo "::group::DEBUG: needs Contents" + echo "DEBUG: toJSON(needs) = ${{ toJSON(needs) }}" + echo "DEBUG: toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" + echo "::endgroup::" From fa4d8aa57042f38931d013a0dc97ef0a89a659b8 Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 23:01:36 +0100 Subject: [PATCH 07/11] Add files via upload --- .github/workflows/nf-test-arm.yml | 153 ++++++++++++++++++++++++++++++ .github/workflows/nf-test-gpu.yml | 125 ++++++++++++++++++++++++ 2 files changed, 278 insertions(+) create mode 100644 .github/workflows/nf-test-arm.yml create mode 100644 .github/workflows/nf-test-gpu.yml diff --git a/.github/workflows/nf-test-arm.yml b/.github/workflows/nf-test-arm.yml new file mode 100644 index 0000000..0101132 --- /dev/null +++ b/.github/workflows/nf-test-arm.yml @@ -0,0 +1,153 @@ +name: Run nf-test on ARM +on: + pull_request: + paths-ignore: + - "docs/**" + - "**/meta.yml" + - "**/*.md" + - "**/*.png" + - "**/*.svg" + release: + types: [published] + workflow_dispatch: + +# Cancel if a newer run is started +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NFT_VER: "0.9.3" + NFT_WORKDIR: "~" + NXF_ANSI_LOG: false + NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity + NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity + +jobs: + nf-test-changes-arm: + name: nf-test-changes-arm + runs-on: # use self-hosted runners + - runs-on=${{ github.run_id }}-nf-test-changes-arm + - runner=4cpu-linux-arm64 + outputs: + shard: ${{ steps.set-shards.outputs.shard }} + total_shards: ${{ steps.set-shards.outputs.total_shards }} + steps: + - name: Clean Workspace # Purge the workspace in case it's running on a self-hosted runner + run: | + ls -la ./ + rm -rf ./* || true + rm -rf ./.??* || true + ls -la ./ + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + + - name: get number of shards + id: set-shards + uses: ./.github/actions/get-shards + env: + NFT_VER: ${{ env.NFT_VER }} + # Skip sentieon tests - no ARM containers available + SKIP_SENTIEON: true + # Skip parabricks tests - requires NVIDIA GPU + SKIP_PARABRICKS: true + with: + max_shards: 14 + + - name: debug + run: | + echo ${{ steps.set-shards.outputs.shard }} + echo ${{ steps.set-shards.outputs.total_shards }} + + nf-test-arm: + name: "${{ matrix.profile }}-${{ matrix.archProfile }} | ${{ matrix.NXF_VER }} | ${{ matrix.shard }}/${{ needs.nf-test-changes-arm.outputs.total_shards }}" + needs: [nf-test-changes-arm] + if: ${{ needs.nf-test-changes-arm.outputs.total_shards != '0' }} + runs-on: # use self-hosted runners + - runs-on=${{ github.run_id }}-nf-test + - runner=4cpu-linux-arm64 + strategy: + fail-fast: false + matrix: + shard: ${{ fromJson(needs.nf-test-changes-arm.outputs.shard) }} + archProfile: [arm64] + profile: [docker] + isMain: + - ${{ github.base_ref == 'master' || github.base_ref == 'main' }} + # Exclude conda and singularity on dev + exclude: + - isMain: false + profile: "conda" + - isMain: false + profile: "singularity" + NXF_VER: + - "25.04.3" + - "latest-everything" + env: + NXF_ANSI_LOG: false + TOTAL_SHARDS: ${{ needs.nf-test-changes-arm.outputs.total_shards }} + + steps: + - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + fetch-depth: 0 + + - name: Run nf-test + id: run_nf_test + uses: ./.github/actions/nf-test + continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }} + env: + NFT_WORKDIR: ${{ env.NFT_WORKDIR }} + NXF_VERSION: ${{ matrix.NXF_VER }} + # Skip sentieon tests - no ARM containers available + SKIP_SENTIEON: true + # Skip parabricks tests - requires NVIDIA GPU + SKIP_PARABRICKS: true + with: + profile: test,${{ matrix.profile }},${{ matrix.archProfile }} + shard: ${{ matrix.shard }} + total_shards: ${{ env.TOTAL_SHARDS }} + + - name: Report test status + if: ${{ always() }} + run: | + if [[ "${{ steps.run_nf_test.outcome }}" == "failure" ]]; then + echo "::error::Test with ${{ matrix.NXF_VER }} failed" + # Add to workflow summary + echo "## ❌ Test failed: ${{ matrix.profile }},${{ matrix.archProfile }} | ${{ matrix.NXF_VER }} | Shard ${{ matrix.shard }}/${{ env.TOTAL_SHARDS }}" >> $GITHUB_STEP_SUMMARY + if [[ "${{ matrix.NXF_VER }}" == "latest-everything" ]]; then + echo "::warning::Test with latest-everything failed but will not cause workflow failure. Please check if the error is expected or if it needs fixing." + fi + if [[ "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then + exit 1 + fi + fi + + confirm-pass-arm: + needs: [nf-test-changes-arm, nf-test-arm] + if: always() + runs-on: # use self-hosted runners + - runs-on=${{ github.run_id }}-confirm-pass + - runner=2cpu-linux-x64 + steps: + - name: One or more tests failed (excluding latest-everything) + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + + - name: One or more tests cancelled + if: ${{ contains(needs.*.result, 'cancelled') }} + run: exit 1 + + - name: All tests ok + if: ${{ contains(needs.*.result, 'success') }} + run: exit 0 + + - name: debug-print + if: always() + run: | + echo "::group::DEBUG: needs Contents" + echo "DEBUG: toJSON(needs) = ${{ toJSON(needs) }}" + echo "DEBUG: toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" + echo "::endgroup::" diff --git a/.github/workflows/nf-test-gpu.yml b/.github/workflows/nf-test-gpu.yml new file mode 100644 index 0000000..1b3c80a --- /dev/null +++ b/.github/workflows/nf-test-gpu.yml @@ -0,0 +1,125 @@ +name: Run GPU nf-tests +on: + push: + branches: + - dev + pull_request: + release: + types: [published] + workflow_dispatch: + inputs: + runners: + description: "Runners to test on" + type: string + default: "gpu" + +# Cancel if a newer run is started +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # renovate: datasource=github-releases depName=askimed/nf-test versioning=semver + NFT_VER: "0.9.3" + NXF_ANSI_LOG: false + NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity + NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity + +jobs: + get-shards: + runs-on: + - runs-on=${{ github.run_id }}-nf-test-get-shards-gpu + - runner=2cpu-linux-x64 + name: "Get Shards" + outputs: + shard: ${{ steps.set-shards.outputs.shard }} + total_shards: ${{ steps.set-shards.outputs.total_shards }} + steps: + - name: Check out pipeline code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + with: + fetch-depth: 0 + + - name: run nf-test-shard action + id: set-shards + uses: ./.github/actions/get-shards + env: + NFT_VER: ${{ env.NFT_VER }} + with: + tags: "gpu" + max_shards: 2 + + - name: Set outputs + id: set-outputs + run: | + echo "shard=${{ steps.set-shards.outputs.shard }}" >> $GITHUB_ENV + echo "total_shards=${{ steps.set-shards.outputs.total_shards }}" >> $GITHUB_ENV + + nf-test-gpu: + needs: [get-shards] + runs-on: "runs-on=${{ github.run_id }}/family=g5.2xlarge/image=ubuntu24-gpu-x64" + name: "GPU Test | ${{ matrix.profile }} | ${{ matrix.shard }} | ${{ matrix.NXF_VER }} | ${{ matrix.filters }}" + env: + NXF_VER: ${{ matrix.NXF_VER }} + + # Only run on push if this is the nf-core dev branch (merged PRs) + # and number of shards is greater than 0 + if: | + needs.get-shards.outputs.total_shards > 0 && + ( + github.event_name != 'push' || + ( github.event_name == 'push' && github.repository == 'nf-core/rnaseq' ) + ) + strategy: + fail-fast: false + matrix: + profile: [docker, singularity] + shard: ${{ fromJson(needs.get-shards.outputs.shard) }} + NXF_VER: + - "25.04.3" + filters: [pipeline] + + steps: + - name: Check out pipeline code + uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 + with: + fetch-depth: 0 + + - name: Test CUDA + run: | + nvidia-smi -L + + - name: Run nf-test Action + uses: ./.github/actions/nf-test + with: + profile: test_gpu,${{ matrix.profile }} + shard: ${{ matrix.shard }} + total_shards: ${{ needs.get-shards.outputs.total_shards }} + filters: ${{ matrix.filters }} + tags: "gpu" + + confirm-pass-gpu: + runs-on: + - runs-on=${{ github.run_id }}-confirm-pass + - runner=2cpu-linux-x64 + needs: [nf-test-gpu] + if: always() + steps: + - name: One or more tests failed + if: ${{ contains(needs.*.result, 'failure') }} + run: exit 1 + + - name: One or more tests cancelled + if: ${{ contains(needs.*.result, 'cancelled') }} + run: exit 1 + + - name: All tests ok + if: ${{ contains(needs.*.result, 'success') }} + run: exit 0 + + - name: debug-print + if: always() + run: | + echo "toJSON(needs) = ${{ toJSON(needs) }}" + echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}" From fe7cf385552b368ddd8a59352f555d75a7c3f19c Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 23:05:11 +0100 Subject: [PATCH 08/11] Delete .github/actions/get-shards/readme.md --- .github/actions/get-shards/readme.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/actions/get-shards/readme.md diff --git a/.github/actions/get-shards/readme.md b/.github/actions/get-shards/readme.md deleted file mode 100644 index 8b13789..0000000 --- a/.github/actions/get-shards/readme.md +++ /dev/null @@ -1 +0,0 @@ - From 08f2f2ddf7dae0d0d13c45cb32551324370558cd Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 23:05:20 +0100 Subject: [PATCH 09/11] Delete .github/actions/readme.md --- .github/actions/readme.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/actions/readme.md diff --git a/.github/actions/readme.md b/.github/actions/readme.md deleted file mode 100644 index 8b13789..0000000 --- a/.github/actions/readme.md +++ /dev/null @@ -1 +0,0 @@ - From 557933a42c03e3c112c587c52a6431bf33244c44 Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Sat, 7 Mar 2026 23:05:30 +0100 Subject: [PATCH 10/11] Delete .github/actions/nf-test/readme.md --- .github/actions/nf-test/readme.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .github/actions/nf-test/readme.md diff --git a/.github/actions/nf-test/readme.md b/.github/actions/nf-test/readme.md deleted file mode 100644 index 8b13789..0000000 --- a/.github/actions/nf-test/readme.md +++ /dev/null @@ -1 +0,0 @@ - From 4aae57ab7279122a7e13f8b94882f9e57963b85d Mon Sep 17 00:00:00 2001 From: Maximilian Stammnitz Date: Mon, 9 Mar 2026 14:25:10 +0100 Subject: [PATCH 11/11] Delete .github/workflows/nf-test-gpu.yml --- .github/workflows/nf-test-gpu.yml | 125 ------------------------------ 1 file changed, 125 deletions(-) delete mode 100644 .github/workflows/nf-test-gpu.yml diff --git a/.github/workflows/nf-test-gpu.yml b/.github/workflows/nf-test-gpu.yml deleted file mode 100644 index 1b3c80a..0000000 --- a/.github/workflows/nf-test-gpu.yml +++ /dev/null @@ -1,125 +0,0 @@ -name: Run GPU nf-tests -on: - push: - branches: - - dev - pull_request: - release: - types: [published] - workflow_dispatch: - inputs: - runners: - description: "Runners to test on" - type: string - default: "gpu" - -# Cancel if a newer run is started -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # renovate: datasource=github-releases depName=askimed/nf-test versioning=semver - NFT_VER: "0.9.3" - NXF_ANSI_LOG: false - NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity - NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity - -jobs: - get-shards: - runs-on: - - runs-on=${{ github.run_id }}-nf-test-get-shards-gpu - - runner=2cpu-linux-x64 - name: "Get Shards" - outputs: - shard: ${{ steps.set-shards.outputs.shard }} - total_shards: ${{ steps.set-shards.outputs.total_shards }} - steps: - - name: Check out pipeline code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - with: - fetch-depth: 0 - - - name: run nf-test-shard action - id: set-shards - uses: ./.github/actions/get-shards - env: - NFT_VER: ${{ env.NFT_VER }} - with: - tags: "gpu" - max_shards: 2 - - - name: Set outputs - id: set-outputs - run: | - echo "shard=${{ steps.set-shards.outputs.shard }}" >> $GITHUB_ENV - echo "total_shards=${{ steps.set-shards.outputs.total_shards }}" >> $GITHUB_ENV - - nf-test-gpu: - needs: [get-shards] - runs-on: "runs-on=${{ github.run_id }}/family=g5.2xlarge/image=ubuntu24-gpu-x64" - name: "GPU Test | ${{ matrix.profile }} | ${{ matrix.shard }} | ${{ matrix.NXF_VER }} | ${{ matrix.filters }}" - env: - NXF_VER: ${{ matrix.NXF_VER }} - - # Only run on push if this is the nf-core dev branch (merged PRs) - # and number of shards is greater than 0 - if: | - needs.get-shards.outputs.total_shards > 0 && - ( - github.event_name != 'push' || - ( github.event_name == 'push' && github.repository == 'nf-core/rnaseq' ) - ) - strategy: - fail-fast: false - matrix: - profile: [docker, singularity] - shard: ${{ fromJson(needs.get-shards.outputs.shard) }} - NXF_VER: - - "25.04.3" - filters: [pipeline] - - steps: - - name: Check out pipeline code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 - with: - fetch-depth: 0 - - - name: Test CUDA - run: | - nvidia-smi -L - - - name: Run nf-test Action - uses: ./.github/actions/nf-test - with: - profile: test_gpu,${{ matrix.profile }} - shard: ${{ matrix.shard }} - total_shards: ${{ needs.get-shards.outputs.total_shards }} - filters: ${{ matrix.filters }} - tags: "gpu" - - confirm-pass-gpu: - runs-on: - - runs-on=${{ github.run_id }}-confirm-pass - - runner=2cpu-linux-x64 - needs: [nf-test-gpu] - if: always() - steps: - - name: One or more tests failed - if: ${{ contains(needs.*.result, 'failure') }} - run: exit 1 - - - name: One or more tests cancelled - if: ${{ contains(needs.*.result, 'cancelled') }} - run: exit 1 - - - name: All tests ok - if: ${{ contains(needs.*.result, 'success') }} - run: exit 0 - - - name: debug-print - if: always() - run: | - echo "toJSON(needs) = ${{ toJSON(needs) }}" - echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}"