forked from deeptools/pyGenomeTracks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
57 lines (51 loc) · 2.25 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
language: c
sudo: true
env:
- TRAVIS_PYTHON_VERSION=2.7
- TRAVIS_PYTHON_VERSION=3.6
os:
- linux
- osx
jobs:
include:
- stage: lint
env:
- LINT=1
- TRAVIS_PYTHON_VERSION=2.7
- TRAVIS_OS_NAME=linux
before_install:
- curl https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -o miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- PATH_WITHOUT_CONDA="$PATH"
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
install:
- conda install --yes python=2.7 flake8
script:
- if [[ "$LINT" == "1" ]]; then flake8 . --exclude=.venv,.build,build --ignore=E501,F403,E402,F999,F405,E712 ; fi
# Setup anaconda
before_install:
- export TEST_DATA_DIR="`pwd`/pygenometracks/test/test_data/"
- echo $TEST_DATA_DIR
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then curl https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -o miniconda.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then curl https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then curl https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -o miniconda.sh ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" && "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then curl https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o miniconda.sh ; fi
- bash miniconda.sh -b -p $HOME/miniconda
- PATH_WITHOUT_CONDA="$PATH"
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
# Install packages
install:
- conda install --yes -c bioconda -c conda-forge python=$TRAVIS_PYTHON_VERSION --file requirements.txt
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then conda install --yes -c bioconda -c conda-forge -c defaults configparser ; fi
- python setup.py install
# command to run tests
script:
- py.test pygenometracks --doctest-modules