-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
52 lines (52 loc) · 1.52 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
language: python
matrix:
include:
- language: generic-covered
python: 3.7
os: osx
- python: 3.7
dist: xenial
os: linux
python:
- "3.7"
before_install:
- if [ $TRAVIS_OS_NAME == "osx" ]; then
echo "Running on OS X";
echo $(python3 --version);
echo $(python --version);
else
echo "Running on Linux";
sudo apt-get update;
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
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 config --append channels conda-forge;
conda update conda;
conda info -a;
echo $(python --version);
fi
install:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
conda create -n test-environment python=$TRAVIS_PYTHON_VERSION <add your conda dependencies here> pytest pytest-cov coveralls;
source activate test-environment;
pip install <add any other dependencies not available in conda here>;
pip3 install -e .;
else
pip3 install -r ci/macos-travis.txt;
pip3 install -e .;
fi
script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then
pwd;
ls;
pytest --cov=<your_library_name>;
coveralls;
if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
conda install conda-build anaconda-client conda-verify;
bash ci/conda_upload.sh;
fi
else
pytest;
fi