forked from trynthink/scout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (45 loc) · 1.55 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
# Based on:
# https://gist.github.com/dan-blanchard/7045057
# https://github.com/Jorge-C/ordination/blob/master/.travis.yml
# https://github.com/soft-matter/trackpy/blob/master/.travis.yml
# http://conda.pydata.org/docs/travis.html
# See also: https://github.com/travis-ci/travis-ci/issues/2650
language: python
python:
- "3.4"
- "3.5"
- "3.6"
# Enable 3.7 without globally enabling sudo and dist: xenial for other build jobs
# This configuration is described in https://github.com/travis-ci/travis-ci/issues/9815#issue-336465122
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
# Download and set up anaconda
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
# Update conda itself
- conda update --yes conda
# Set up grunt by installing grunt-cli
# and the dependencies listed in package.json
- npm install -g grunt-cli
- npm install
# Install packages
install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.4" ]]; then
conda create --yes -n testenv python=$TRAVIS_PYTHON_VERSION numpy scipy flake8 requests;
else
conda create --yes -n testenv python=$TRAVIS_PYTHON_VERSION numpy=1.15 scipy flake8 requests;
fi
- source activate testenv
# Run test(s)
script:
- python3 -m unittest discover -p '*_test.py'
- grunt travis -v
- if [[ "$TRAVIS_PYTHON_VERSION" != "3.4" ]]; then
flake8 --exclude docs/conf.py --max-line-length=100;
fi