Skip to content

add nf-test workflow to test modules with nf-test #1

add nf-test workflow to test modules with nf-test

add nf-test workflow to test modules with nf-test #1

Workflow file for this run

name: Run nf-test on github_actions_mza
on:
push:
branches:
- 'github_actions_mza'
workflow_dispatch:
inputs:
nextflow_version:
description: 'Nextflow version to install'
type: string
default: '24.10.1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NXF_ANSI_LOG: false
NFT_VER: '0.9.2' # nf-test version
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
jobs:
nf-test:
runs-on: ubuntu-latest
name: Run nf-test on ubuntu-latest
strategy:
matrix:
profile: [singularity]
shard: [1, 2, 3]
env:
TOTAL_SHARDS: 3
steps:
# Clean the workspace for a fresh run
- name: Clean Workspace
run: |
rm -rf $GITHUB_WORKSPACE/*
# Check out the repository
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Install Nextflow
- name: Install Nextflow
run: |
curl -s https://get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
nextflow -version
# Set up environmental variables for Nextflow
- name: Set Nextflow Environment Variables
run: |
echo "export NXF_VER=${{ github.event.inputs.nextflow_version }}" >> $GITHUB_ENV
# Run nf-test for each profile and shard
- name: Run nf-test Action
run: |
echo "Running nf-test for profile: ${{ matrix.profile }}, shard: ${{ matrix.shard }}"
nf-test --profile ${{ matrix.profile }} --shard ${{ matrix.shard }} --total-shards ${{ env.TOTAL_SHARDS }}