Scatter ci #248
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nf-core CI | |
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors | |
on: | |
push: | |
branches: | |
- dev | |
pull_request: | |
release: | |
types: [published] | |
env: | |
NXF_ANSI_LOG: false | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
list: | |
name: list ${{ matrix.profile }}-${{ matrix.NXF_VER }} | |
if: "${{ github.event_name != 'push' || (github.event_name == 'push' && github.repository == 'nf-core/nascent') }}" | |
outputs: | |
# Expose matched filters as job 'modules' output variable | |
modules: ${{ steps.list.outputs.tests }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Nextflow | |
uses: nf-core/setup-nextflow@v1 | |
- name: Install nf-test | |
if: steps.cache-software.outputs.cache-hit != 'true' | |
run: | | |
wget -qO- https://code.askimed.com/install/nf-test | bash | |
sudo mv nf-test /usr/local/bin/ | |
- name: List nf-test | |
id: list | |
run: | | |
echo "tests=$(nf-test list --json)" >> "$GITHUB_OUTPUT" | |
test: | |
name: nf-test ${{ matrix.profile }}-${{ matrix.NXF_VER }} | |
# Only run on push if this is the nf-core dev branch (merged PRs) | |
if: needs.list.outputs.tests != '[]' | |
needs: [list] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
NXF_VER: | |
- "23.04.0" | |
- "latest-everything" | |
profile: ["docker"] # TODO , "singularity", "conda"] | |
test: ["${{ fromJson(needs.list.outputs.tests) }}"] | |
steps: | |
- name: Check out pipeline code | |
uses: actions/checkout@v3 | |
- name: Cache Nextflow installation | |
id: cache-software | |
uses: actions/cache@v3 | |
with: | |
path: | | |
/usr/local/bin/nf-test | |
/home/runner/.nf-test/nf-test.jar | |
key: nascent-${{ runner.os }}-${{ matrix.NXF_VER }} | |
- name: Install Nextflow | |
uses: nf-core/setup-nextflow@v1 | |
with: | |
version: "${{ matrix.NXF_VER }}" | |
- name: Install nf-test | |
if: steps.cache-software.outputs.cache-hit != 'true' | |
run: | | |
wget -qO- https://code.askimed.com/install/nf-test | bash | |
sudo mv nf-test /usr/local/bin/ | |
- name: Set up Singularity | |
if: matrix.profile == 'singularity' | |
uses: eWaterCycle/setup-singularity@v5 | |
with: | |
singularity-version: 3.7.1 | |
- name: Set up miniconda | |
if: matrix.profile == 'conda' | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
channels: conda-forge,bioconda,defaults | |
python-version: ${{ matrix.python-version }} | |
- name: Conda clean | |
if: matrix.profile == 'conda' | |
run: conda clean -a | |
- name: Run nf-test | |
run: | | |
nf-test test \ | |
--profile=${{ matrix.profile }} \ | |
${{ matrix.test }} \ | |
--tap=test.tap | |
- uses: pcolby/tap-summary@v1 | |
with: | |
path: >- | |
test.tap |