mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
c19671dca9
* feat(subworkflows): Add align_bowtie2 subworkflow For testing CI setup * test(align_bowtie2): Add initial list of changes to test * test(align_bowtie2): Add initial test * refactor: Use tags to run subworkflows ci For every underlying module used by workflow and allow the modules pytest-modules definition be the source of truth. * refactor: Use individual directories for subworkflows * docs(align_bowtie2): Add initial meta.yml Copied most of it from the bowtie2/align module. * fix(align_bowtie2): Fix module include paths * test(bam_sort_samtools): Add initial test * ci(bam_sort_samtools): Add modules that trigger the tag * test(bam_stats_samtools): Add initial test * ci(bam_stats_samtools): Add keys to pick up changes * docs(bam_samtools): Add initial meta.yml * test(align_bowtie2): Fix path to subworkflow * test(align_bowtie2): Update entry point * fix(bam_sort_samtools): Update include paths * test(bam_sort_samtools): Fix path * style: Clean up addParams * test(samtools_sort): Add suffix for test * test(align_bowtie2): Add samtools_options for suffix * test(bam_stats_samtools): Update path * test(bam_stats_samtools): Use stats input Otherwise it's just an example of how it's used in the bam_sort_samtools subworkflow * ci(linting): Skip module linting of subworkflows * ci(linting): Clean up startsWith statement * test(bam_stats_samtools): Use single end test data for single end test * test(bam_stats_samtools): Add expected files * test(align_bowtie2): Add paired-end test * test(align_bowtie2): Sort order of output * test(align_bowtie2): Update hashes * docs(align_bowtie2): Fix typo * test(align_bowtie2): Update samtools output names * test(align_bowtie2): Remove md5sums for bam/bai * feat(subworkflows): Add nextflow.configs These can be used for default settings in the future. They can then be included in the conf/modules.config so that the params don't have to be duplicated in the root nextflow.config. * docs(subworkflows): Include modules instead of tools * fix: Update to versions * chore(align_bowtie2): Remove duplicate tag * style: Format yamls * test(subworkflows): Only check versions for modules * chore: Update subworkflows to match rnaseq dev * fix(subworkflows): Update paths * fix(bam_sort_samtools): Fix sort parameters for testing * Apply suggestions from code review Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com> * docs: Update TODOs with a message * ci: Try using a matrix for strategy * ci: Try passing an array * Revert "ci: Try passing an array" This reverts commit d3611fcd8332bbb9a8501e8dd299d0a623aaecaa. Co-authored-by: Harshil Patel <drpatelh@users.noreply.github.com>
82 lines
2.2 KiB
YAML
82 lines
2.2 KiB
YAML
name: nf-core linting
|
|
# This workflow is triggered on pushes and PRs to the repository.
|
|
# It runs the `nf-core lint` tests to ensure that the module code meets the nf-core guidelines
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
|
|
jobs:
|
|
changes:
|
|
name: Check for changes
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
# Expose matched filters as job 'modules' output variable
|
|
modules: ${{ steps.filter.outputs.changes }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: dorny/paths-filter@v2
|
|
id: filter
|
|
with:
|
|
filters: "tests/config/pytest_modules.yml"
|
|
|
|
lint:
|
|
runs-on: ubuntu-20.04
|
|
env:
|
|
NXF_VER: 21.04.0
|
|
|
|
name: ${{ matrix.tags }}
|
|
needs: changes
|
|
if: needs.changes.outputs.modules != '[]'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
tags: ["${{ fromJson(needs.changes.outputs.modules) }}"]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Install pip
|
|
run: python -m pip install --upgrade pip
|
|
|
|
# FIXME: Remove this when nf-core modules lint stabilizes and install stable release
|
|
- name: Install nf-core tools development version
|
|
run: python -m pip install --upgrade --force-reinstall git+https://github.com/nf-core/tools.git@dev
|
|
|
|
- name: Install Nextflow
|
|
env:
|
|
CAPSULE_LOG: none
|
|
run: |
|
|
wget -qO- get.nextflow.io | bash
|
|
sudo mv nextflow /usr/local/bin/
|
|
|
|
- name: Lint ${{ matrix.tags }}
|
|
run: nf-core modules lint ${{ matrix.tags }}
|
|
# HACK
|
|
if: startsWith( matrix.tags, 'subworkflow' ) != true
|
|
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: /usr/local/bin/nextflow
|
|
key: ${{ runner.os }}
|
|
restore-keys: |
|
|
${{ runner.os }}
|