Skip to content

updated ci workflow #49

updated ci workflow

updated ci workflow #49

Workflow file for this run

name: Test nf-core Modules
on:
push:
branches:
- 'github_actions_mza'
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NXF_ANSI_LOG: false
NFT_VER: '0.9.2' # nf-test version
jobs:
discover-modules:
name: Discover nf-core Modules
runs-on: ubuntu-latest
outputs:
module_list: ${{ steps.get-modules.outputs.module_list }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: List nf-core Modules
id: get-modules
run: |
modules=$(find modules -type d -maxdepth 1 -mindepth 1 -exec basename {} \;)
modules_json=$(printf '%s\n' "${modules}" | jq -R . | jq -s .)
echo "::set-output name=module_list::${modules_json}"
shell: bash
nf-test:
needs: discover-modules
runs-on: ubuntu-latest
name: '${{ matrix.profile }} | ${{ matrix.shard }}'
# TODO
# needs: get-number-of-shards
# if: ${{ fromJSON(needs.get-number-of-shards.outputs.shards) != fromJSON('["1", "0"]') }}
strategy:
fail-fast: false
matrix:
module: ${{ fromJSON(needs.discover-modules.outputs.module_list) }}
# NOTE We could split these, but there's probably going to be more process tests than workflow tests, so we're just going to combine them all and bump up the shards for now
# NOTE The name of the test would be name: "${{ matrix.filter }} | ${{ matrix.profile }} | ${{ matrix.shard }}"
# filter: [process, workflow]
profile: [conda, docker_self_hosted, singularity]
shard: [1, 2, 3, 4, 5]
env:
# FIXME Bumping them up to make the transition smooth, then we can throttle them back
TOTAL_SHARDS: 5
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}
steps:
# Clean workspace
- name: Clean Workspace
run: |
rm -rf $GITHUB_WORKSPACE/*
# Checkout Code
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth:
- name: Run nf-test Action
uses: ./.github/actions/nf-test-action
with:
profile: ${{ matrix.profile }}
shard: ${{ matrix.shard }}
total_shards: ${{ env.TOTAL_SHARDS }}
- name: Clean Workspace # Purge the workspace in case it's running on a self-hosted runner
uses: ./.github/actions/self-hosted-cleanup