diff --git a/.github/workflows/ucsc_bedgraphtobigwig.yml b/.github/workflows/ucsc_bedgraphtobigwig.yml new file mode 100644 index 00000000..11772d78 --- /dev/null +++ b/.github/workflows/ucsc_bedgraphtobigwig.yml @@ -0,0 +1,39 @@ +name: ucsc_bedgraphtobigwig +on: + push: + paths: + - software/ucsc/bedgraphtobigwig/** + - .github/workflows/ucsc_bedgraphtobigwig.yml + - tests/software/ucsc/** + pull_request: + paths: + - software/ucsc/bedgraphtobigwig/** + - .github/workflows/ucsc_bedgraphtobigwig.yml + - tests/software/ucsc/** + +jobs: + ci_test: + runs-on: ubuntu-latest + strategy: + matrix: + nxf_version: [20.11.0-edge] + env: + NXF_ANSI_LOG: false + steps: + - uses: actions/checkout@v2 + + - name: Install Nextflow + env: + NXF_VER: ${{ matrix.nxf_version }} + run: | + wget -qO- get.nextflow.io | bash + sudo mv nextflow /usr/local/bin/ + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Install dependencies + run: python -m pip install --upgrade pip pytest-workflow + + # Test the module + - run: pytest --tag ucsc_bedgraphtobigwig --symlink --wt 2 diff --git a/tests/software/ucsc/main.nf b/tests/software/ucsc/main.nf new file mode 100644 index 00000000..1613a707 --- /dev/null +++ b/tests/software/ucsc/main.nf @@ -0,0 +1,15 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { UCSC_BEDGRAPHTOBIGWIG } from '../../../software/ucsc/bedgraphtobigwig/main.nf' addParams( options: [:] ) + +workflow test_ucsc_bedgraphtobigwig { + def input = [] + input = [ [ id:'test' ], // meta map + [ file('https://raw.githubusercontent.com/igvteam/igv.js/master/test/data/wig/bedgraph-example-uscs.bedgraph', checkIfExists: true) ] ] + UCSC_BEDGRAPHTOBIGWIG ( + input, + file('https://raw.githubusercontent.com/igvteam/igv.js/master/test/data/wig/chrom.sizes', checkIfExists: true) + ) +} diff --git a/tests/software/ucsc/test.yml b/tests/software/ucsc/test.yml new file mode 100644 index 00000000..53be4e77 --- /dev/null +++ b/tests/software/ucsc/test.yml @@ -0,0 +1,7 @@ +- name: Run bedgraphtobigwig test workflow + command: nextflow run ./tests/software/ucsc/ -profile docker -entry test_ucsc_bedgraphtobigwig -c tests/config/nextflow.config + tags: + - ucsc_bedgraphtobigwig + files: + - path: output/ucsc/test.bigWig + md5sum: 5346de25b01ecbff91b63178b3bfbeec