forked from nf-core/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
60 lines (55 loc) · 2.78 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
sudo: required
language: python
jdk: openjdk8
python:
- '2.7'
- '3.5'
- '3.6'
- '3.7'
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" ] || [ $TRAVIS_PULL_REQUEST_BRANCH = "patch" ]))'
# Check that the changelog has been updated if this is a PR
- git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*" && git fetch
- '[ $TRAVIS_PULL_REQUEST = "false" ] || [ $(git diff --name-only HEAD origin/${TRAVIS_BRANCH} | grep CHANGELOG.md | wc -l) -ge 1 ]'
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
# Set up nf-core and test/coverage modules
- cd ${TRAVIS_BUILD_DIR}
- pip install --upgrade pip # Get rid of dependency resolve issues from older pip versions
- pip install .
- pip install codecov 'pytest==3.6.4' pytest-datafiles pytest-cov mock jsonschema
- pip install Sphinx sphinxcontrib-napoleon # For autodoc generation
- sudo apt-get install npm && npm install -g markdownlint-cli # For documentation linting
script:
# Test the main code in this repo
- pytest --cov=nf_core .
- markdownlint . -c ${TRAVIS_BUILD_DIR}/.github/markdownlint.yml
# Test the pipeline template code
- nf-core create -n testpipeline -d "This pipeline is for testing" -a "Testing McTestface"
- nf-core lint nf-core-testpipeline
- markdownlint nf-core-testpipeline -c nf-core-testpipeline/.github/markdownlint.yml
after_success:
- codecov --rcfile=${TRAVIS_BUILD_DIR}/.github/coveragerc
jobs:
include:
- stage: docs generation
if: (branch = "master" OR branch = "dev") AND type = push AND repo = nf-core/tools
script: bash ./bin/push.sh
deploy:
provider: pypi
user: "ewels"
password:
secure: "nSrZdapawe/sCIQuHeYYsh3oyezEOvIh6ZhHvokQPfLrEd17ERvP/qQbIgA4DSzpMJ4w/B72/ZFuvkn3oBna/niQNoKhrW2969RQzaIBobzEIvq6jX7Q08bTRN+DdKtsTqNOJLvB2Q8PWflvcfYrhVCCivAs9eUV0vUooqpvzH+t6AFRvodTzmXtqFlV/YWOSwogAMeqYFW7Ya7poX5XUkUMNYwH0J84AtlWuxjMrFU1mEqk0WxUkWC56akaltk3DkeS7N4/8yPHQhCYYweGPYA0KQbPWpIQzO/ij5M3qggncaypyEi5fTsC7tyz8K5T033FE6LfkD4wuxXZrWN3BZRvSlCgGHw4lGu1Yqm4kSyCZROcHVE2xgbMwxWrdvwyKophRKqnQukAxNqXPBrfm/id+FI3cEh9611GqxpFXDkWn7E+IcKKwk2n0EbZFQGhTzNP4YoDJRY6q5SjYnxfsgsuyo1CGPpB9RNGDOAznxZmRKRumXyXPPrPEC2M7jfiSCfEwhbDP6rMrcFjPP2rI/no7Y9A5XK8grs750fcUpNoCcInKLXUodK3PtLHuUiFjJTobAqAdORBX8+DE8Ghlf5IhoSBq7yFuNma2CzBs8AVtEYiSDxuDkOGhn+KpYX2pZS2YA9F4PBk1g0mK3Q4rVqkFVTDmORu644D5H7wUDo="
on:
tags: true
distributions: sdist bdist_wheel
repo: nf-core/tools
python: '3.6'
# Sync pipelines with possible nf-core template changes
after_deploy:
- ./bin/sync