This repository has been archived by the owner on Jun 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy path.travis.yml
61 lines (61 loc) · 2.01 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
language: python
sudo: false
python:
- "2.7"
branches:
only:
- master
- /^v[0-9].*$/
addons:
apt:
packages:
- gfortran
before_install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
- conda config --set always_yes yes --set changeps1 no --set show_channel_urls yes
- conda config --add channels conda-forge
- conda update -q conda
- conda info -a
- conda install conda-env # no longer installed by default?
install:
# Edit in the correct Python version into environment.yaml
- sed -i "s/- python/- python=${TRAVIS_PYTHON_VERSION}/g" environment.yaml
# Create conda matching requirements
- conda env create -n test -f environment.yaml
- source activate test
# Temporary fix for rpy2
- CFLAGS="-I${CONDA_PREFIX}/include ${CFLAGS}" pip install rpy2
# Rest of dependencies
- "pip install -r requirements/dev.txt"
# Install YATSM
- "pip install -e ."
script:
- py.test -ra tests/
# Disable numba JIT for coverage to correctly identify JIT-ed lines
# See: http://stackoverflow.com/questions/26875191/analyzing-coverage-of-numba-wrapped-functions
- NUMBA_DISABLE_JIT=1 coverage run --source yatsm -m py.test
after_success:
# Report coverage
- pip install coveralls
- coverage report
- coveralls
# Docs
- source activate test
- pip install -r docs/requirements.txt
- bash docs/scripts/deploy-to-gh-pages.sh
before_cache:
# Deactivate conda so we use system 'curl'
- source deactivate
env:
global:
- ENCRYPTION_LABEL: "e56a8a33a954"
- COMMIT_AUTHOR_EMAIL: "[email protected]"
- COMMIT_AUTHOR_NAME: "Chris Holden"
notifications:
email: false