-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
81 lines (71 loc) · 3.12 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
language: python
python:
# conda doesn't seem to work with 2.6 so let's forget about testing it
#- 2.6
- 2.7
# test_save_and_load fails on minimax.wcon with Python 3.3, haven't had change to look into it
#- 3.3
- 3.4
- 3.5
- 3.6
notifications:
email: false
before_install:
- pip install --upgrade pip
- pip install six
- pip install pep8
- which python
- python --version
# Anaconda installation
- |
if [[ ($TRAVIS_PYTHON_VERSION == 2.6) || ($TRAVIS_PYTHON_VERSION == 2.7) ]]; then
MINICONDA_DIR=/home/travis/miniconda2
wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh
else
MINICONDA_DIR=/home/travis/miniconda3
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
fi
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=$MINICONDA_DIR/bin:$PATH
# Need to install the actual Python version, does this work?
# To get the correct version you have to do a conda install
# Old versions are at: http://repo.continuum.io/miniconda/ but don't
# match Python versions and it seems like continuum doesn't want you
# to try and match
- conda install --yes python=$TRAVIS_PYTHON_VERSION numpy scipy pandas jsonschema psutil
# Diagnostic information
- which python
- python --version
- pydoc modules
before_script:
- cd $TRAVIS_BUILD_DIR/tests
# Supplement our folder of test files with some larger ones we don't store directly in the GitHub repo
# Download files from Dropbox because it is impossible to download files directly from Google Drive
# if they are larger than the size at which Google warns that it can't scan for viruses; this popup
# means we don't get the file using wget. Dropbox works like a charm, however.
# (See http://stackoverflow.com/questions/25010369/)
- wget "https://www.dropbox.com/s/gda92wl2hdoiu8y/testfile_new.wcon?dl=1" -O from_schafer_lab.wcon
- wget "https://www.dropbox.com/s/apjyc9lh1t7646q/XJ30_NaCl500mM4uL6h_10m45x10s40s_Ea.wcon?dl=1" -O from_kerr.wcon
# Zip the downloaded files so zipped versions can also be tested
- zip from_schafer_lab_zipped.wcon.zip from_schafer_lab.wcon
- zip from_kerr_zipped.wcon.zip from_kerr.wcon
- ls -l
- cd $TRAVIS_BUILD_DIR
script:
# Run pep8 on all .py files in all subfolders
# We must ignore E402 module level import not at top of file
# because of use case sys.path.append('..'); import <module>
- find . -name \*.py -exec pep8 --ignore=E402 {} +
# NOTE: To correct any errors in the above pep8 check, run the
# following to clear out about 80% of the issues automatically:
# # Get the latest version of the repo
# git pull
# # Run autopep8 on all .py files in all subfolders
# find . -name \*.py -exec autopep8 --recursive --aggressive --aggressive --in-place {} +
# # Push these changes to GitHub
# git commit -a -m "autopep8"
# git push
- cd $TRAVIS_BUILD_DIR/src/Python/tests/
- pwd
- python -m unittest discover