Skip to content
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 45 additions & 17 deletions nf_core/pipeline-template/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ on:

env:
NXF_ANSI_LOG: false
NXF_SINGULARITY_CACHEDIR: {% raw %}${{ github.workspace }}{% endraw %}/.singularity
NXF_SINGULARITY_LIBRARYDIR: {% raw %}${{ github.workspace }}{% endraw %}/.singularity

concurrency:
group: "{% raw %}${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}{% endraw %}"
group: "{% raw %}${{ github.workflow }}{% endraw %}-{% raw %}${{ github.event.pull_request.number || github.ref }}{% endraw %}"
Comment thread
maxulysse marked this conversation as resolved.
Outdated
cancel-in-progress: true

jobs:
test:
name: Run pipeline with test data
name: "Run pipeline with test data ({% raw %}${{ matrix.NXF_VER }}{% endraw %} | {% raw %}${{ matrix.test }}{% endraw %} | {% raw %}${{ matrix.profile }}{% endraw %})"
# Only run on push if this is the nf-core dev branch (merged PRs)
if: "{% raw %}${{{% endraw %} github.event_name != 'push' || (github.event_name == 'push' && github.repository == '{{ name }}') {% raw %}}}{% endraw %}"
runs-on: ubuntu-latest
Expand All @@ -27,6 +29,20 @@ jobs:
NXF_VER:
- "24.04.2"
- "latest-everything"
profile:
- "conda"
- "docker"
- "singularity"
test:
Comment thread
maxulysse marked this conversation as resolved.
Outdated
# TODO nf-core: You can customise CI pipeline run tests as required
Comment thread
maxulysse marked this conversation as resolved.
Outdated
- "test"
isMaster:
- {% raw %}${{ github.base_ref == 'master' }}{% endraw %}
exclude:
- isMaster: false
profile: "conda"
- isMaster: false
profile: "singularity"
steps:
- name: Check out pipeline code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
Expand All @@ -36,24 +52,36 @@ jobs:
with:
version: "{% raw %}${{ matrix.NXF_VER }}{% endraw %}"

- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
- name: Setup apptainer
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-apptainer@main

- name: Run pipeline with test data (docker)
# TODO nf-core: You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
- name: Set up Singularity
if: matrix.profile == 'singularity'
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results
mkdir -p $NXF_SINGULARITY_CACHEDIR
mkdir -p $NXF_SINGULARITY_LIBRARYDIR

- name: Set up miniconda
if: matrix.profile == 'conda'
uses: conda-incubator/setup-miniconda@a4260408e20b96e80095f42ff7f1a15b27dd94ca # v3
with:
miniconda-version: "latest"
auto-update-conda: true
Comment thread
maxulysse marked this conversation as resolved.
channels: conda-forge,bioconda

- name: Run pipeline with test data (singularity)
# TODO nf-core: You can customise CI pipeline run tests as required
- name: Conda setup
if: matrix.profile == 'conda'
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,singularity --outdir ./results
if: "{% raw %}${{ github.base_ref == 'master' }}{% endraw %}"
conda clean -a
conda install -n base conda-libmamba-solver
conda config --set solver libmamba
echo $(realpath $CONDA)/condabin >> $GITHUB_PATH
echo $(realpath python) >> $GITHUB_PATH
Comment on lines +73 to +78
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these shouldn't be needed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copy pasted from modules

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so which part should I remove there?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread
maxulysse marked this conversation as resolved.
Outdated

- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: Run pipeline with test data (conda)
# TODO nf-core: You can customise CI pipeline run tests as required
- name: " Run pipeline with test data {% raw %}${{ matrix.NXF_VER }}{% endraw %} | {% raw %}${{ matrix.test }}{% endraw %} | {% raw %}${{ matrix.profile }}{% endraw %}"
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,conda --outdir ./results
if: "{% raw %}${{ github.base_ref == 'master' }}{% endraw %}"
nextflow run ${GITHUB_WORKSPACE} -profile {% raw %}${{ matrix.test }}{% endraw %},{% raw %}${{ matrix.profile }}{% endraw %} --outdir ./results