-
Notifications
You must be signed in to change notification settings - Fork 69
/
.travis.yml
66 lines (59 loc) · 2.62 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
# from http://conda.pydata.org/docs/travis.html
language: python
dist: trusty
python:
- "3.4"
- "3.5"
- "3.6"
# fix for https://github.com/travis-ci/travis-ci/issues/9815
matrix:
include:
- python: 3.7
dist: xenial
sudo: true
install:
- sudo apt-get update
# We do this conditionally because it saves us some downloading if the
# version is the same.
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- 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
# Replace dep1 dep2 ... with your dependencies
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION pip flake8
pyparsing pytest conda-build anaconda-client conda-verify
- conda install -q -n test-environment -c dsm blpapi
- source activate test-environment
- python setup.py install
# command to run tests
script:
- flake8 pdblp
- pytest pdblp/tests -v --offline
- if [ $TRAVIS_PYTHON_VERSION != 3.5]; then conda-build --no-anaconda-upload .; fi
after_success:
- if [[ $TRAVIS_TAG && $TRAVIS_PYTHON_VERSION != 3.5]];
then echo "Uploading $(conda build . --output) to anaconda cloud"; fi
- if [[ $TRAVIS_TAG && $TRAVIS_PYTHON_VERSION != 3.5]];
then anaconda -t $CONDA_UPLOAD_TOKEN upload $(conda build . --output); fi
notifications:
email: false
deploy:
provider: pypi
user: matthewgilbert
password:
# generate from terminal using "travis encrypt PYPI_PW -r user/repo"
secure: "HxPPIPrvUY0lOkRfzhRGn+gN2aBxInjE17xKRd8louQWumjJNFqD2NEC1jKKB25wz4w9wr9gJ7XEWf3RqRvNvt6NfxTPd1XE8L8sfmD5z7i9HKX/9jTtL7fjMaLwSjqp9H1WTnQc0BhpYJuOkZBlDcDcEXL3vMmV43U9uGoDHWw/zRoWrwj0PuAZ5YzQVRn6I+f6wfygHPLfBc2IdpXMrQugm0nECwVsJMJrInDQRopSd3fsXH9iPFCr1kAqu3+5zRjA6YVWJ/2dN4B1SnKj1mU+kWc3wMAmYYh+RAfn6qzpgnnsTA7PoJitRC1z+dtycmRzhsg0+uQv4N4WGHPZSbC3VkCEGBoINaoxbkCKb25ZChmd2TCGi9/WYDFXVmSoe/44Wf1P662MBpvCkaiOd14S0zIuNv6U5ewDw0fXvsDT0lUCzsGG3/tCkG21SunV8X9vIVIfHDeH/YUdFO9qqFZaZ2B2/jDmgQ5rL/alMFwfcTd9VmPyWJPE9drtnOVk6reBBs/YidruFJJ4BILXUqQ38aELpDswC+T4q1Nfgmv7aZIBa1kkM8wp1OMHH73I89sekUxEIZAGbRi/RiSj59yTUOTW5J7y4swhYA+A4nZd2083xAmapY0l+Kjut8s9k48WJYfm96p0Qqk7Deo7vgdbe/hRZdMHX7NwOdmPGMk="
on:
tags: true
distributions: sdist bdist_wheel
repo: matthewgilbert/pdblp
branch: master
condition: $TRAVIS_PYTHON_VERSION == 3.7