/
.travis.yml
41 lines (34 loc) · 1019 Bytes
/
.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
language: python
python:
- 2.7
- 3.6
sudo: false
env:
global:
- PYPI_PY=3.6 # deploy to pypi from python 3.6
env:
- TEST_DIR="tests"
# Setup anaconda
before_install:
- pip install --upgrade pip;
- pip install -r requirements.txt
install:
# - conda install --yes pip python=$TRAVIS_PYTHON_VERSION numpy scipy matplotlib ipywidgets
- export PATH=$PWD/simpeg:$PATH
# Run test
script:
- travis_wait 30 nosetests $TEST_DIR -v -s
# upload to pypi on success
after_success:
#deploy to pypi
- if [ $TRAVIS_PYTHON_VERSION == $PYPI_PY ]; then
if [ "$TRAVIS_TAG" = "true" ]; then
openssl aes-256-cbc -K $encrypted_bc303f70394a_key -iv $encrypted_bc303f70394a_iv -in credentials.tar.gz.enc -out credentials.tar.gz -d;
tar -xzf credentials.tar.gz;
mv credentials/.pypirc ~/.pypirc ;
python setup.py sdist bdist_wheel ;
travis_wait 20 twine upload -r pypi --skip-existing dist/* ;
fi
fi
notifications:
slack: ubcgif:1Z2lR3XYRSM3GHflG71ZHEN6