-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (38 loc) · 1.14 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
language: python
python:
- 2.7
- 3.6
- 3.7
matrix:
allow_failures:
- python: 3.7
sudo: false
env:
global:
- MASTER_BRANCH=master
- PYPI_PY=3.6 # deploy to pypi from python 3.6
install:
- pip install -r requirements_dev.txt
- python setup.py install
- make build
script:
- nosetests tests --with-cov --cov matrixutils --cov-config .coveragerc -v -s;
after_success:
- bash <(curl -s https://codecov.io/bash)
# early exit if not on a deplotment branch
- if ! [ "$TRAVIS_BRANCH" = "$MASTER_BRANCH" -o "$TRAVIS_TAG" = "true" ]; then
echo "Not deploying (because this is not a deployment branch)" ;
exit 0 ;
fi
- if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then
echo "Not deploying (because this is a pull request)" ;
exit 0 ;
fi
# unpack credentials
- openssl aes-256-cbc -K $encrypted_8a9a8f45ade1_key -iv $encrypted_8a9a8f45ade1_iv -in credentials.tar.gz.enc -out credentials.tar.gz -d
- tar -xzf credentials.tar.gz
# deploy to pypi on tags
- mv credentials/.pypirc ~/.pypirc ;
- python setup.py sdist bdist_wheel --universal upload;
notifications:
slack: simpeg:1KZq5giMtlJJ58TijIPgqf7n