Skip to content

Commit 1ebec86

Browse files
committed
Merge branch 'rel-0.5.0'
2 parents 2d5713f + b22373f commit 1ebec86

29 files changed

Lines changed: 1536 additions & 822 deletions

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ updates:
55
directory: "/"
66
schedule:
77
interval: "daily"
8+
target-branch: "dev"

.github/workflows/docker-image.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,21 @@ jobs:
6565
username: ${{ secrets.DOCKER_HUB_USERNAME }}
6666
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
6767

68+
- name: Set platforms
69+
id: set_platforms
70+
run: |
71+
echo "github ref: ${GITHUB_REF}"
72+
if [[ "${GITHUB_REF##*/}" == "main" || "${GITHUB_REF##*/}" == "dev" ]]; then
73+
echo "platforms=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT
74+
else
75+
echo "platforms=linux/amd64" >> $GITHUB_OUTPUT
76+
fi
77+
6878
- name: Build and push
6979
uses: docker/build-push-action@v6
7080
with:
7181
context: .
72-
platforms: linux/amd64,linux/arm64
82+
platforms: ${{ steps.set_platforms.outputs.platforms }}
7383
push: true
7484
#${{ github.event_name != 'push' && github.event_name != 'pull_request' }}
7585
tags: ${{ steps.meta.outputs.tags }}

.github/workflows/nf-test.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: nf-test CI
2+
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
pull_request:
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
env:
13+
NFT_DIFF: "pdiff"
14+
NFT_DIFF_ARGS: "--line-numbers --width 120 --expand-tabs=2"
15+
NFT_VER: "0.9.2"
16+
NFT_WORKDIR: "${{ github.workspace }}/nf-test-work"
17+
NXF_ANSI_LOG: false
18+
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
19+
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
20+
21+
concurrency:
22+
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
23+
cancel-in-progress: true
24+
25+
jobs:
26+
test:
27+
runs-on: ubuntu-latest
28+
name: "Test ${{ matrix.filter }} | ${{ matrix.profile }} | ${{ matrix.NXF_VER }} | ${{ matrix.shard }}/5"
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
NXF_VER:
33+
- "24.10.2"
34+
- "latest-everything"
35+
filter: ["pipeline"]
36+
# filter: ["process", "workflow", "function", "pipeline"]
37+
profile: ["conda", "docker", "singularity"]
38+
shard: [1]
39+
# shard: [1, 2, 3, 4, 5]
40+
41+
steps:
42+
- name: Check out pipeline code
43+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
44+
with:
45+
fetch-depth: 0
46+
47+
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5
48+
with:
49+
python-version: "3.11"
50+
51+
- uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4
52+
with:
53+
distribution: "temurin"
54+
java-version: "17"
55+
56+
- name: Set up Nextflow
57+
uses: nf-core/setup-nextflow@v2
58+
with:
59+
version: "${{ matrix.NXF_VER }}"
60+
61+
- name: Set up nf-test
62+
uses: nf-core/setup-nf-test@v1
63+
with:
64+
version: ${{ env.NFT_VER }}
65+
66+
- name: Set up apptainer
67+
if: matrix.profile == 'singularity'
68+
uses: eWaterCycle/setup-apptainer@main
69+
70+
- name: Set up Singularity
71+
if: matrix.profile == 'singularity'
72+
run: |
73+
mkdir -p $NXF_SINGULARITY_CACHEDIR
74+
mkdir -p $NXF_SINGULARITY_LIBRARYDIR
75+
76+
- name: Install pdiff
77+
run: python -m pip install --upgrade pip pdiff cryptography
78+
79+
- name: Set up miniconda
80+
if: matrix.profile == 'conda'
81+
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
82+
with:
83+
miniconda-version: "latest"
84+
auto-update-conda: true
85+
conda-solver: libmamba
86+
channels: conda-forge,bioconda
87+
88+
- name: Set up Conda
89+
if: matrix.profile == 'conda'
90+
run: |
91+
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
92+
echo $(realpath python) >> $GITHUB_PATH
93+
94+
#- name: Disk space cleanup
95+
# uses: jlumbroso/free-disk-space@v1.3.1
96+
97+
- name: Start summary
98+
id: print-test
99+
run: |
100+
echo "## nf-test tests summary :rocket:" >> $GITHUB_STEP_SUMMARY
101+
echo "" >> $GITHUB_STEP_SUMMARY
102+
echo "This \`${{ matrix.filter }}\` ${{ matrix.shard }}/5 shard was run on \`${{ matrix.profile }}\` | \`NXF_VER=${{ matrix.NXF_VER }}\`, and contains the following test(s):" >> $GITHUB_STEP_SUMMARY
103+
echo "" >> $GITHUB_STEP_SUMMARY
104+
nf-test test \
105+
--ci \
106+
--dryRun \
107+
--junitxml="TEST-${{ matrix.filter }}_${{ matrix.profile }}_${{ matrix.shard }}.xml" \
108+
--shard ${{ matrix.shard }}/1 \
109+
--follow-dependencies \
110+
--profile "+${{ matrix.profile }}" \
111+
--filter ${{ matrix.filter }} \
112+
| grep PASSED | cut -d "'" -f 2 | sed 's/^/- /' | sort -u >> $GITHUB_STEP_SUMMARY
113+
114+
- name: "Run tests | ${{ matrix.filter }}_${{ matrix.profile }} | ${{ matrix.shard }}/1"
115+
run: |
116+
nf-test test \
117+
--ci \
118+
--debug \
119+
--verbose \
120+
--junitxml="TEST-${{ matrix.filter }}_${{ matrix.profile }}_${{ matrix.shard }}.xml" \
121+
--shard ${{ matrix.shard }}/1 \
122+
--follow-dependencies \
123+
--profile "+${{ matrix.profile }}" \
124+
--filter ${{ matrix.filter }}
125+
126+
- name: Print success in summary
127+
if: success()
128+
run: |
129+
echo "" >> $GITHUB_STEP_SUMMARY
130+
echo "All test(s) successfull :tada:" >> $GITHUB_STEP_SUMMARY
131+
132+
- name: Print failure in summary
133+
if: failure()
134+
run: |
135+
echo "" >> $GITHUB_STEP_SUMMARY
136+
echo "Some test(s) failed :cold_sweat:" >> $GITHUB_STEP_SUMMARY
137+
138+
- name: Publish Test Report
139+
uses: mikepenz/action-junit-report@v4
140+
if: success() || failure() # always run even if the previous step fails
141+
with:
142+
report_paths: "TEST-*.xml"
143+
144+
- name: Upload test results
145+
if: always() # run even if tests fail
146+
uses: actions/upload-artifact@v4
147+
with:
148+
name: nf-test-results-${{ matrix.filter }}-${{ matrix.profile }}-${{ matrix.NXF_VER }}-${{ matrix.shard }}
149+
path: |
150+
TEST-*.xml
151+
${{ env.NFT_WORKDIR }}/**/output/**
152+
retention-days: 4
153+
154+
- name: Clean up
155+
if: success() || failure()
156+
run: |
157+
sudo rm -rf /home/ubuntu/tests/

0 commit comments

Comments
 (0)