-
Notifications
You must be signed in to change notification settings - Fork 4
93 lines (83 loc) · 2.7 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Test nf-core Modules
on:
push:
branches:
- 'github_actions_mza'
workflow_dispatch:
inputs:
runners:
description: 'Runners to test on'
type: choice
options:
- 'ubuntu-latest'
- 'self-hosted'
default: 'ubuntu-latest'
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.2'
NXF_ANSI_LOG: false
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
NXF_VER: '24.10.1'
jobs:
discover-modules:
name: Discover nf-core Modules with Tests
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 with Tests
id: get-modules
run: |
modules=$(find modules/nf-core -type d -maxdepth 1 -mindepth 1 | while read module; do
if [ -d "$module/tests" ]; then
basename "$module"
fi
done | jq -R -s -c 'split("\n") | map(select(length > 0))')
if [ "$modules" == "[]" ]; then
echo "No modules with tests found!"
exit 1
fi
echo "module_list=$modules" >> $GITHUB_OUTPUT
shell: bash
- name: Display discovered modules
run: |
echo "Discovered modules with tests:"
echo '${{ steps.get-modules.outputs.module_list }}' | jq .
shell: bash
nf-test:
needs: discover-modules
runs-on: ${{ github.event.inputs.runners || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
module: ${{ fromJson(needs.discover-modules.outputs.module_list) }}
profile: [singularity, docker, conda]
name: '${{ matrix.profile }} | ${{ matrix.module }}'
env:
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}
steps:
- name: Clean Workspace
run: |
rm -rf $GITHUB_WORKSPACE/*
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run nf-test Action
uses: ./.github/actions/nf-test-action
with:
profile: ${{ matrix.profile }}
module: ${{ matrix.module }}
- name: Display Test Summary
if: always()
run: |
echo "Test Summary for ${{ matrix.module }} (${{ matrix.profile }}):"
cat modules/nf-core/${{ matrix.module }}/test.tap | grep -E '^(not )?ok'
shell: bash