Skip to content

Commit

Permalink
adding nf-core lint (#31)
Browse files Browse the repository at this point in the history
* Fix nf-core lint on sarek
* Remove extra CI from .travis.yml and GitHub Actions nf-core CI
* Add new nf-core extra CI
* remove fancy badges
* Remove TODO nf-core comments in code
* Use 1.1_2 version for rcolorbrewer, according to nf-core lint
  • Loading branch information
maxulysse authored Sep 4, 2019
1 parent f4a9dbf commit 70fb026
Show file tree
Hide file tree
Showing 12 changed files with 88 additions and 77 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci-extra.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: nf-core extra CI
# This workflow is triggered on pushes and PRs to the repository.
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
test: [ANNOTATESNPEFF, ANNOTATEVEP, GERMLINE, SOMATIC, TARGETED]
nxf_ver: ['19.04.0', '']
steps:
- uses: actions/checkout@v1
- name: Install Nextflow
run: |
export NXF_VER=${{ matrix.nxf_ver }}
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Download image
run: |
${GITHUB_WORKSPACE}/scripts/download_image.sh -n docker --test ${{ matrix.test }}
- name: Build References
run: |
${GITHUB_WORKSPACE}/scripts/build_reference.sh --test ${{ matrix.test }} --verbose --memory 6.GB
- name: Run test
run: |
${GITHUB_WORKSPACE}/scripts/run_tests.sh --test ${{ matrix.test }} --verbose --memory 6.GB
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
test: [ANNOTATESNPEFF, ANNOTATEVEP, GERMLINE, SOMATIC, TARGETED]
nxf_ver: ['19.04.0', '']
steps:
- uses: actions/checkout@v1
Expand All @@ -16,12 +15,9 @@ jobs:
export NXF_VER=${{ matrix.nxf_ver }}
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Download image
- name: Build references
run: |
${GITHUB_WORKSPACE}/scripts/download_image.sh -n docker --test ${{ matrix.test }}
- name: Build References
run: |
${GITHUB_WORKSPACE}/scripts/build_reference.sh --test ${{ matrix.test }} --verbose --memory 6.GB
nextflow run ${GITHUB_WORKSPACE}/build.nf -profile test,docker --build --outdir references
- name: Run test
run: |
${GITHUB_WORKSPACE}/scripts/run_tests.sh --test ${{ matrix.test }} --verbose --memory 6.GB
nextflow run ${GITHUB_WORKSPACE} -profile test,docker
24 changes: 23 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,26 @@ jobs:
npm install -g markdownlint-cli
- name: Run Markdownlint
run: |
markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml
markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml
nf-core:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Nextflow
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- uses: actions/setup-python@v1
with:
python-version: '3.6'
architecture: 'x64'
- name: Install pip
run: |
sudo apt install python3-pip
pip install --upgrade pip
- name: Install nf-core tools
run: |
pip install nf-core
- name: Run nf-core lint
run: |
nf-core lint ${GITHUB_WORKSPACE}
54 changes: 17 additions & 37 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,42 @@ sudo: required
language: python
jdk: openjdk8
services: docker

addons:
apt:
update: true

python: '3.6'
cache: pip

matrix:
fast_finish: true

env:
matrix:
- TEST=ANNOTATEVEP NXF_VER=19.04.0
- TEST=ANNOTATEVEP NXF_VER=''
- TEST=SOMATIC NXF_VER=19.04.0
- TEST=SOMATIC NXF_VER=''
- TEST=TARGETED NXF_VER=19.04.0
- TEST=TARGETED NXF_VER=''
- TEST=GERMLINE NXF_VER=19.04.0
- TEST=GERMLINE NXF_VER=''
- TEST=ANNOTATESNPEFF NXF_VER=19.04.0
- TEST=ANNOTATESNPEFF NXF_VER=''

before_install:
# PRs to master are only ok if coming from dev branch
- '[ $TRAVIS_PULL_REQUEST = "false" ] || [ $TRAVIS_BRANCH != "master" ] || ([ $TRAVIS_PULL_REQUEST_SLUG = $TRAVIS_REPO_SLUG ] && [ $TRAVIS_PULL_REQUEST_BRANCH = "dev" ])'
# Pull the docker image first so the test doesn't wait for this
- "travis_retry ./scripts/download_image.sh -n docker --test $TEST"
- docker pull nfcore/sarek:dev
# Fake the tag locally so that the pipeline runs properly
# Looks weird when this is :dev to :dev, but makes sense when testing code for a release (:dev to :1.0.1)
- docker tag nfcore/sarek:dev nfcore/sarek:dev

install:
# Install Nextflow
- mkdir /tmp/nextflow && cd /tmp/nextflow
- wget -qO- get.nextflow.io | bash
- sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
# # Install nf-core/tools
# - pip install --upgrade pip
# - pip install nf-core
# Install nf-core/tools
- pip install --upgrade pip
- pip install nf-core
# Reset
- mkdir ${TRAVIS_BUILD_DIR}/tests && cd ${TRAVIS_BUILD_DIR}/tests
# Install markdownlint-cli
- sudo apt-get install npm && npm install -g markdownlint-cli

# Build references if needed
before_script:
- ${TRAVIS_BUILD_DIR}/scripts/build_reference.sh --test $TEST --verbose
env:
- NXF_VER='19.04.0' # Specify a minimum NF version that should be tested and work
- NXF_VER='' # Plus: get the latest NF version and check that it works

# Actual tests
script:
- "${TRAVIS_BUILD_DIR}/scripts/run_tests.sh --test $TEST --verbose --no-reports"

# Linting
jobs:
include:
- stage: "Linting"
name: "Markdown"
env: TEST=LINT NXF_VER=19.04.0
script:
- markdownlint ${TRAVIS_BUILD_DIR} -c ${TRAVIS_BUILD_DIR}/.github/markdownlint.yml
# Lint the pipeline code
- nf-core lint ${TRAVIS_BUILD_DIR}
# Lint the documentation
- markdownlint ${TRAVIS_BUILD_DIR} -c ${TRAVIS_BUILD_DIR}/.github/markdownlint.yml
# Run the pipeline with the test profile
- nextflow run ${TRAVIS_BUILD_DIR}/build.nf -profile test,docker --build --outdir references
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Initial release of `nf-core/sarek`, created with the [nf-core](http://nf-co.re/)
- [#21](https://github.com/nf-core/sarek/pull/21) - Add tests for latest Nextflow version as well
- [#21](https://github.com/nf-core/sarek/pull/21) - Add `genomes.config` for genomes without AWS iGenomes
- [#XXX](https://github.com/nf-core/sarek/pull/XXX) - Use Github actions for CI
- [#31](https://github.com/nf-core/sarek/pull/31) - Add nf-core lint
- [#31](https://github.com/nf-core/sarek/pull/31) - Add extra CI to GitHub Actions nf-core extra CI

### `Changed`

Expand Down Expand Up @@ -70,13 +72,15 @@ Initial release of `nf-core/sarek`, created with the [nf-core](http://nf-co.re/)
- [#18](https://github.com/nf-core/sarek/pull/18), [#29](https://github.com/nf-core/sarek/pull/29) - `--noReports` is now `--skipQC all`
- [#18](https://github.com/nf-core/sarek/pull/18), [#21](https://github.com/nf-core/sarek/pull/21) - Update logo
- [#21](https://github.com/nf-core/sarek/pull/21) - Moved smallGRCh37 path to `genomes.config`
- [#31](https://github.com/nf-core/sarek/pull/31) - Move extra CI to GitHub Actions nf-core extra CI

### `Removed`

- [#9](https://github.com/nf-core/sarek/pull/9) - Removed `relatedness2` graph from `vcftools stats`
- [#13](https://github.com/nf-core/sarek/pull/13) - Removed `BamQCmapped` and `BamQCrecalibrated` processes
- [#13](https://github.com/nf-core/sarek/pull/13) - Removed `CompressVCF`
- [#18](https://github.com/nf-core/sarek/pull/18) - Removed params `--noReports`
- [#31](https://github.com/nf-core/sarek/pull/31) - Remove extra CI from Travis CI and GitHub Actions nf-core CI

### `Fixed`

Expand All @@ -90,6 +94,8 @@ Initial release of `nf-core/sarek`, created with the [nf-core](http://nf-co.re/)
- [#20](https://github.com/nf-core/sarek/pull/20) - Use new logo in README
- [#20](https://github.com/nf-core/sarek/pull/20) - Fix path to references genomes
- [#22](https://github.com/nf-core/sarek/pull/22) - Fix --singleCPUMem issue
- [#31](https://github.com/nf-core/sarek/pull/31) - Fix badges according to nf-core lint
- [#31](https://github.com/nf-core/sarek/pull/31) - Fix rcolorbrewer version according to nf-core lint

## [2.3.FIX1] - 2019-03-04

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nfcore/base:1.6
FROM nfcore/base
LABEL authors="Maxime Garcia" \
description="Docker image containing all requirements for nf-core/sarek pipeline"

Expand Down
Loading

0 comments on commit 70fb026

Please sign in to comment.