-
Notifications
You must be signed in to change notification settings - Fork 243
TEMPLATE: Parallelize pipeline GHA tests over docker/conda/singularity #3214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 16 commits
972de9d
8ab88cb
ba6b661
35d7e08
a1ff5e9
45012dd
991fa5e
27be623
eb2be9a
1c8d74b
7556c0a
b51770c
42f1de4
ac3d577
71d348d
dfe65d4
3bd7105
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| name: nf-core CI | ||
| # This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors | ||
| # {% raw %}This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors | ||
| on: | ||
| push: | ||
| branches: | ||
|
|
@@ -11,49 +11,78 @@ on: | |
|
|
||
| env: | ||
| NXF_ANSI_LOG: false | ||
| NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity | ||
| NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity | ||
|
|
||
| concurrency: | ||
| group: "{% raw %}${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}{% endraw %}" | ||
| group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Run pipeline with test data | ||
| name: "Run pipeline with test data (${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }})" | ||
| # 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: "${{{% endraw %} github.event_name != 'push' || (github.event_name == 'push' && github.repository == '{{ name }}') {% raw %}}}" | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| NXF_VER: | ||
| - "24.04.2" | ||
| - "latest-everything" | ||
| profile: | ||
| - "conda" | ||
| - "docker" | ||
| - "singularity" | ||
| test_name: | ||
| - "test" | ||
| isMaster: | ||
| - ${{ github.base_ref == 'master' }} | ||
| # Exclude conda and singularity on dev | ||
| exclude: | ||
| - isMaster: false | ||
| profile: "conda" | ||
| - isMaster: false | ||
| profile: "singularity" | ||
| steps: | ||
| - name: Check out pipeline code | ||
| uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4 | ||
|
|
||
| - name: Install Nextflow | ||
| - name: Set up Nextflow | ||
| uses: nf-core/setup-nextflow@v2 | ||
| with: | ||
| version: "{% raw %}${{ matrix.NXF_VER }}{% endraw %}" | ||
| version: "${{ matrix.NXF_VER }}" | ||
|
|
||
| - name: Disk space cleanup | ||
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | ||
| - name: Set up 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 | ||
| conda-solver: libmamba | ||
| channels: conda-forge,bioconda | ||
|
|
||
| - name: Run pipeline with test data (singularity) | ||
| # TODO nf-core: You can customise CI pipeline run tests as required | ||
| - name: Set up Conda | ||
| 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
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these shouldn't be needed
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just copy pasted from modules
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so which part should I remove there?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
maxulysse marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Clean up Disk space | ||
| 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 ${{ matrix.NXF_VER }} | ${{ matrix.test_name }} | ${{ matrix.profile }}" | ||
| run: | | ||
| nextflow run ${GITHUB_WORKSPACE} -profile test,conda --outdir ./results | ||
| if: "{% raw %}${{ github.base_ref == 'master' }}{% endraw %}" | ||
| nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.test_name }},${{ matrix.profile }} --outdir ./results{% endraw %} | ||
Uh oh!
There was an error while loading. Please reload this page.