Add continuous integration #2
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: CI | |
# This workflow runs the pipeline with the minimal test dataset to check that | |
# it completes without any syntax errors | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- main | |
- dev | |
draft: true | |
env: | |
NXF_ANSI_LOG: false | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Install and run self-test pipeline | |
# Only run on push if this is in the main repository | |
if: "${{ github.repository == 'genomic-medicine-sweden/gms_16s' }}" | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
NXF_VER: | |
- "23.10.1" | |
steps: | |
- name: Install Nextflow | |
# For running (locally) with ACT, we use a docker image with Nextflow pre-installed | |
if: "${{ ! github.event.act }}" | |
uses: nf-core/setup-nextflow@v1 | |
with: | |
version: "${{ matrix.NXF_VER }}" | |
- name: Check out pipeline code | |
uses: actions/checkout@v3 | |
- name: Install Singularity | |
# For running (locally) with ACT, we use a docker image with Singularity already installed | |
if: "${{ ! github.event.act }}" | |
run: | | |
wget https://github.com/apptainer/singularity/releases/download/v3.8.7/singularity-container_3.8.7_amd64.deb && sudo dpkg -i singularity-container_3.8.7_amd64.deb | |
- name: Report disk-usage before make install | |
run: | |
df -h | |
- name: Run Make install | |
run: | |
make install | |
- name: Report disk-usage after make install | |
run: | |
df -h | |
- name: Adapt paths in samplelist.csv | |
# We have to use '#' as a separator, as there are slashes in the $PWD | |
# path, messing up with the s///-replace syntax | |
run: | | |
sed -i "s#PATH_TO_GMS16S#$PWD#g" assets/test_data/samplelist.csv | |
- name: Run pipeline with test data | |
run: | | |
nextflow run main.nf \ | |
--input assets/examples/samplesheet_medium.csv \ | |
--outdir results \ | |
--db assets/databases/emu_database \ | |
--seqtype map-ont \ | |
-profile singularity,test \ | |
--quality_filtering \ | |
--longread_qc_qualityfilter_minlength 1200 \ | |
--longread_qc_qualityfilter_maxlength 1800 |