Skip to content

Commit

Permalink
fix GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
maxulysse committed Oct 10, 2024
1 parent 8ab88cb commit ba6b661
Showing 1 changed file with 51 additions and 10 deletions.
61 changes: 51 additions & 10 deletions nf_core/pipeline-template/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,44 @@ 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 %}"
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 %}"
if: "{% raw %}${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/bamtofastq') }}{% endraw %}"
runs-on: ubuntu-latest
strategy:
matrix:
NXF_VER:
- "24.04.2"
- "latest-everything"
engine:
profile:
- "conda"
- "docker"
- "singularity"
test:
- "test"
- "test_cram"
- "test_chr"
- "test_no_bai"
- "test_no_crai"
- "test_no_stats"
- "test_no_qc"
- "test_collate_fast"
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 @@ -40,13 +58,36 @@ jobs:
with:
version: "{% raw %}${{ matrix.NXF_VER }}{% endraw %}"

- name: Setup apptainer
if: matrix.profile == 'singularity'
uses: eWaterCycle/setup-apptainer@main

- name: Set up Singularity
if: matrix.profile == 'singularity'
run: |
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
channels: conda-forge,bioconda

- name: Conda setup
if: matrix.profile == 'conda'
run: |
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
- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: "Run pipeline with test data {% raw %}${{ matrix.NXF_VER }}{% endraw %} | {% raw %}${{ matrix.engine }}{% endraw %}"
# 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: " 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,{% raw %}${{ matrix.engine }}{% endraw %} --outdir ./results
if: "!{% raw %}${{ github.base_ref == 'master' }}{% endraw %} || {% raw %}${{ matrix.engine == 'docker' }}{% endraw %}"
nextflow run ${GITHUB_WORKSPACE} -profile {% raw %}${{ matrix.test }}{% endraw %},{% raw %}${{ matrix.profile }}{% endraw %} --outdir ./results

0 comments on commit ba6b661

Please sign in to comment.