Skip to content

Run nf-test

Run nf-test #26

Workflow file for this run

name: Run nf-test
on:
pull_request:
paths-ignore:
- "docs/**"
release:
types: [published]
workflow_dispatch:
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: ubuntu-latest
outputs:
shard: ${{ steps.set-shards.outputs.shard }}
total_shards: ${{ steps.set-shards.outputs.total_shards }}
steps:
- name: Clean Workspace
run: rm -rf ./* || true
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: get number of shards
id: set-shards
uses: ./.github/actions/get-shards
with:
max_shards: 7
nf-test:
name: "${{ matrix.profile }} | ${{ matrix.shard }}/${{ needs.nf-test-changes.outputs.total_shards }}"
needs: [nf-test-changes]
if: ${{ needs.nf-test-changes.outputs.total_shards != '0' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: ${{ fromJson(needs.nf-test-changes.outputs.shard) }}
profile: [docker, singularity]
NXF_VER: ["25.04.0"]
env:
NXF_VERSION: ${{ matrix.NXF_VER }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Run nf-test
uses: ./.github/actions/nf-test
with:
profile: ${{ matrix.profile }}
shard: ${{ matrix.shard }}
total_shards: ${{ needs.nf-test-changes.outputs.total_shards }}
confirm-pass:
needs: [nf-test]
if: always()
runs-on: ubuntu-latest
steps:
- name: All tests ok
if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }}
run: exit 0
- name: Tests failed
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1