forked from MiraGeoscience/geoh5py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
66 lines (53 loc) · 1.64 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
language: python
python:
- 3.7
sudo: false
addons:
apt:
packages:
- libblas-dev
- liblapack-dev
env:
global:
- DEPLOY_DIR=tests/docs
- MASTER_BRANCH=master
- PYPI_PY=3.7 # deploy to pypi from python 3.7
matrix:
- TEST_DIR=tests
# Setup anaconda
before_install:
# Install packages
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- chmod +x miniconda.sh
- ./miniconda.sh -b -p $HOME/miniconda
- export PATH=/home/travis/anaconda/bin:/home/travis/miniconda/bin:$PATH
- conda update --yes conda
install:
- conda install --quiet --yes pip python=$TRAVIS_PYTHON_VERSION numpy h5py;
- pip install -r requirements_dev.txt
- python setup.py install
# Run test
script:
# - nosetests $TEST_DIR --with-cov --cov SimPEG --cov-config .coveragerc -v -s
- nosetests $TEST_DIR --with-cov --cov geoh5py --cov-config .coveragerc -v -s;
# Calculate coverage
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 ! [ "$TEST_DIR" = "$DEPLOY_DIR" ]; then
echo "Not deploying (because this is not a deployment directory)" ;
exit 0 ;
fi
- if ! [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
echo "Not deploying (because this is a pull request)" ;
exit 0 ;
fi
#deploy to pypi
- if [ "$TRAVIS_TAG" = "true" ]; then
mv credentials/.pypirc ~/.pypirc ;
python setup.py sdist bdist_wheel --universal upload;
fi