Skip to content

Commit 4229478

Browse files
committedNov 4, 2024
Second look to CI tests
1 parent dbafb1c commit 4229478

File tree

1 file changed

+60
-8
lines changed

1 file changed

+60
-8
lines changed
 

‎.github/workflows/ci.yml

+60-8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ on:
1212
env:
1313
NXF_ANSI_LOG: false
1414
NFT_VER: "0.9.0"
15+
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
16+
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
1517

1618
concurrency:
1719
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
@@ -20,6 +22,8 @@ concurrency:
2022
jobs:
2123
test_profile_standard:
2224
name: nf-test with standard profiles
25+
# Only run on push if this is the nf-core dev branch (merged PRs)
26+
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/metapep') }}"
2327
runs-on: ubuntu-latest
2428
strategy:
2529
fail-fast: false
@@ -28,6 +32,10 @@ jobs:
2832
- "24.04.2"
2933
- "latest-everything"
3034
profile:
35+
- "conda"
36+
- "docker"
37+
- "singularity"
38+
test_name:
3139
- "test"
3240
- "test_model_information"
3341
- "test_mouse_all_pep_lengths"
@@ -37,6 +45,14 @@ jobs:
3745
- "test_mhcflurry"
3846
- "test_mhcnuggets_1"
3947
- "test_mhcnuggets_2"
48+
isMaster:
49+
- ${{ github.base_ref == 'master' }}
50+
# Exclude conda and singularity on dev
51+
exclude:
52+
- isMaster: false
53+
profile: "conda"
54+
- isMaster: false
55+
profile: "singularity"
4056

4157
steps:
4258
- name: Check out pipeline code
@@ -82,7 +98,7 @@ jobs:
8298

8399
- name: Run nf-test
84100
run: |
85-
nf-test test --tag ${{ matrix.profile }} --profile ${{ matrix.profile }},docker --junitxml=test.xml --verbose
101+
nf-test test --tag ${{ matrix.test_name }} --profile ${{ matrix.test_name }},${{ matrix.test_name }} --junitxml=test.xml --verbose
86102
87103
- name: Output log on failure
88104
if: failure()
@@ -106,24 +122,60 @@ jobs:
106122
fail-fast: false
107123
matrix:
108124
NXF_VER:
109-
- "23.04.0"
125+
- "24.04.2"
110126
- "latest-everything"
111127
profile:
128+
- "conda"
129+
- "docker"
130+
- "singularity"
131+
test_name:
112132
- "test_all"
113133
- "test_mouse"
114134
- "test_taxa_only"
115135
- "test_taxa_specific_assembly"
116-
136+
isMaster:
137+
- ${{ github.base_ref == 'master' }}
138+
# Exclude conda and singularity on dev
139+
exclude:
140+
- isMaster: false
141+
profile: "conda"
142+
- isMaster: false
143+
profile: "singularity"
117144
steps:
118145
- name: Check out pipeline code
119-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
146+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
120147

121-
- name: Install Nextflow
122-
uses: nf-core/setup-nextflow@v1
148+
- name: Set up Nextflow
149+
uses: nf-core/setup-nextflow@v2
123150
with:
124151
version: "${{ matrix.NXF_VER }}"
125152

126-
- name: Disk space cleanup
153+
- name: Set up Apptainer
154+
if: matrix.profile == 'singularity'
155+
uses: eWaterCycle/setup-apptainer@main
156+
157+
- name: Set up Singularity
158+
if: matrix.profile == 'singularity'
159+
run: |
160+
mkdir -p $NXF_SINGULARITY_CACHEDIR
161+
mkdir -p $NXF_SINGULARITY_LIBRARYDIR
162+
163+
- name: Set up Miniconda
164+
if: matrix.profile == 'conda'
165+
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
166+
with:
167+
miniconda-version: "latest"
168+
auto-update-conda: true
169+
conda-solver: libmamba
170+
channels: conda-forge,bioconda
171+
172+
- name: Set up Conda
173+
if: matrix.profile == 'conda'
174+
run: |
175+
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
176+
echo $(realpath python) >> $GITHUB_PATH
177+
178+
- name: Clean up Disk space
127179
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
128180

129181
- name: Install nf-test
@@ -138,7 +190,7 @@ jobs:
138190
run: |
139191
nextflow secrets set NCBI_EMAIL ${{ secrets.NCBI_EMAIL }}
140192
nextflow secrets set NCBI_KEY ${{ secrets.NCBI_KEY }}
141-
nf-test test --tag ${{ matrix.profile }} --profile ${{ matrix.profile }},docker --junitxml=test.xml --verbose
193+
nf-test test --tag ${{ matrix.test_name }} --profile ${{ matrix.test_name }},${{ matrix.test_name }} --junitxml=test.xml --verbose
142194
143195
- name: Output log on failure
144196
if: failure()

0 commit comments

Comments
 (0)
Please sign in to comment.