forked from Sage-Bionetworks/synapsePythonClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (80 loc) · 2.93 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
82
83
84
85
86
87
88
89
90
sudo: required
language: python
matrix:
include:
- os: linux
python: 2.7.14
env:
# workaround for the dbus-python package installation not being able to find python shared object files for compilation when using virtualenv.
# source: https://github.com/willprice/python-omxplayer-wrapper/pull/101/files
- 'PYTHON_LIBS="-L$(python-config --prefix)/lib $(python-config --libs)"'
- PY_ENABLE_SHARD=0
- os: linux
python: 3.5.3
env:
- 'PYTHON_LIBS="-L$(python-config --prefix)/lib $(python-config --libs)"'
- PY_ENABLE_SHARD=0
- os: linux
python: 3.6.2
env:
- 'PYTHON_LIBS="-L$(python-config --prefix)/lib $(python-config --libs)"'
- PY_ENABLE_SHARD=0
- os: osx
language: generic
env: PY_VERSION=2.7.14
- os: osx
language: generic
env: PY_VERSION=3.5.3
- os: osx
language: generic
env: PY_VERSION=3.6.2
addons:
#This is used for SFTP integration tests
ssh_known_hosts: ec2-54-212-85-156.us-west-2.compute.amazonaws.com
before_install:
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
brew update
brew outdated pyenv || brew upgrade pyenv
brew install pyenv-virtualenv
pyenv install $PY_VERSION
export PYENV_VERSION=$PY_VERSION
export PATH="/Users/travis/.pyenv/shims:${PATH}"
pyenv-virtualenv venv
source venv/bin/activate
pip install nose mock
fi
install:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
sudo apt-get update
sudo apt-get install gnome-keyring python-gnomekeyring libdbus-glib-1-dev
pip install --no-cache-dir --upgrade --force-reinstall dbus-python==1.2.4
fi
- pip install -U setuptools
- travis_wait pip install pysftp pandas boto3
- python setup.py install
before_script:
- | # decrypt credentials used in tests
if [[ "${TRAVIS_PULL_REQUEST}" = "false" ]]; then
openssl aes-256-cbc -K $encrypted_d17283647768_key -iv $encrypted_d17283647768_iv -in test.synapseConfig.enc -out test.synapseConfig -d
mv test.synapseConfig ~/.synapseConfig
openssl aes-256-cbc -K $encrypted_d17283647768_key -iv $encrypted_d17283647768_iv -in test.awscredentials.enc -out test.awscredentials -d
mkdir -p ~/.aws && mv test.awscredentials ~/.aws/credentials
fi
script:
- nosetests -vs tests/unit
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ];then
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
# set up the dbus daemon used to connect to the keyring. create default "login" keyring.
# TODO: once Travis uses Ubuntu Xenial instead of Trusty, remove python-gnomekeyring and just use 'gnome-keyring-daemon --unlock'
eval $(dbus-launch --sh-syntax)
echo -n "hunter2" | eval $(gnome-keyring-daemon --login)
eval $(gnome-keyring-daemon --components=secrets --start)
/usr/bin/python -c "import gnomekeyring;gnomekeyring.create_sync('login', '');";
fi
nosetests -vs tests/integration
else
echo "Skipping integration tests";
fi