-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path.travis.yml
85 lines (72 loc) · 2.06 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Based on http://conda.pydata.org/docs/travis.html
language: minimal
sudo: false # use container based build
notifications:
email: false
matrix:
fast_finish: true
include:
# - name: "python-2.7"
# env: PY=2.7
- name: "python-3.7"
env: PY=3.7
- name: "python-3.8"
env: PY=3.8
- name: "tarball"
env: PY=3
- name: "docs"
env: PY=3
#jobs:
# allow_failures:
# - env: PY=2.7
before_install:
# Build the conda testing environment.
- >
echo "Installing miniconda and cftime dependencies...";
wget http://bit.ly/miniconda -O miniconda.sh;
bash miniconda.sh -b -p ${HOME}/miniconda;
export PATH="${HOME}/miniconda/bin:${PATH}";
conda update conda --yes --all;
conda config --add channels conda-forge --force;
export ENV_NAME="test-environment";
conda create --yes -n ${ENV_NAME} python=${PY} --file requirements.txt --file requirements-dev.txt;
source activate ${ENV_NAME};
# Log the conda environment and package details.
- conda list -n ${ENV_NAME}
- conda list -n ${ENV_NAME} --explicit
- conda info -a
install:
# Install cftime.
- echo "Installing cftime..."
- CYTHON_COVERAGE=1 pip install -e . --no-deps --force-reinstall
script:
- if [[ $TRAVIS_JOB_NAME == python-* ]]; then
cp -r test/ /tmp ;
pushd /tmp && pytest && popd ;
fi
- if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then
pushd docs && make html linkcheck O=-W && popd;
fi
- if [[ $TRAVIS_JOB_NAME == 'tarball' ]]; then
python setup.py --version ;
pip wheel . -w dist --no-deps ;
check-manifest --verbose ;
twine check dist/* ;
fi
after_success:
- coveralls
before_deploy:
# Remove unused, unminified javascript from sphinx
- |
if [[ $TRAVIS_JOB_NAME == 'docs' ]]; then
rm -f docs/build/html/_static/jquery-*.js
rm -f docs/build/html/_static/underscore-*.js
rm -f docs/build/html/.buildinfo
fi
deploy:
- provider: script
script: ci/deploy_docs.sh
skip_cleanup: true
on:
branch: master
condition: '$TRAVIS_JOB_NAME == "tarball"'