forked from GenericMappingTools/pygmt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
130 lines (120 loc) · 5.85 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
language: generic
sudo: false
branches:
only:
- master
# Regex to build tagged commits with version numbers
- /\d+\.\d+(\.\d+)?(\S*)?$/
env:
global:
# CODACY_PROJECT_TOKEN to upload coverage to codacy
- secure: "neO+GkXP+ohhnfAg+VUh7kPQtaXNASv6levimV8hzj7Cd+nv9xrzPeq56Goh/TAeoYscM/IUB/vK6xwYfJOJeS2c4jsPqzqXZl+LIaxxU+HvvTewLnYNpg/+uKJ6sGVArC67DVTl9M6sJG2+AxoqB/0xJ46YAhH6a2bwXbMl1h/UILxy15oqTtFsgga0NPikVLLra00U5kChVjbkahPOgLuntLTMr62AJ92MZPy3jgCjVQO944KhCs1yy0LiErLTgFu2N8pTl62ZBVK40B6KkLepcJmRBCC6+qrG4ZRCHXIZyp/qs/YYxXVBSTEW/coQmZ9pNVVsPxTC+9x0otMAHeePp5/Nk9zt4m2R6AF+sN2da0NHwBK98JXSIQWi50hFeYaTSYaeaL6vSB3ievLkE+pku22hYEU5h9fBql4pnok4QUbyGSAQdxKDOuUEus1+3+H1PwksLpiwcImHfH0T5z+jxwfNHnjdhtADc/zgpGR0v0FIMMCauknjNCzRoUBBPDbmQyQFzP+0KityySA0SXKP8L9bOUxRcf1BDi5G96i0RWKCYRGet7OaQ5ynt3Z8X4ery2S3nCx4CmSXX3C0NSfeZu3Pkof+fcOdvxh+orOvRCqRJ9hh7lZyyB4kecGjJJbF5JC3rXE5efcWBgDOzhJevU5hDH2lURKeJBpeN1Y="
# Github Token for pushing the built docs (GH_TOKEN)
- secure: "QII0477v0mmCCW3qSNXLCOtqraJaCICtSghiyrxYsuUdJTrXzXBNhX2KLIjcKYXOK1HdwYOFGf8xBVLl44clHlAW7R32ecEGeTJizr0yqTBvT3rNG1Xb7+E6jdXqrIs//PmPRaF8zOZxPl1SJKDK4jJpCx5HnAflg7wl/6tQLD6K3/dQ6FG2s3UKsc8o4qchOiEfxYhOuKo3jt2S0HdsNAQFw3mFHCCrclxDr3llSQtWSY0mirZnta7AI4nMvzxl2nUhdHEpxgzIjWxCWLAwmj3/NxLz0VSgNCtl2bNYk6AYrc5RcANGk2fcYaZr9mTU3Aax60S4389B39Pq95hBN21jYdbw9vCN810dYpTUk2siLysx8gF6r2JWEF8SskXlF79r3phtaFTMOS4GqeiuwjifZeaLAL/H1PTQFDDG/UKEwBpLuzrPMDw/84iRtyWKqWR/f14YdKhH4YAkcOuRglEXiI/1A0qWKiZ1iZfky8Tys+wN5nyss23w/JeYXVgBdTkNzvp3diFWK8+Wl9j3HYpX9LlEHJwASA1wHLL85t4ToymgLjo9gvLvwzB7T+fWNtEbh4ELbvI7jaKrvir8uSGYy4bGbfRclh5CktD//mTLhDyAsQDS8obF/Ri9mVqFzjK6417ORfu8qnpXU+mIHPRBoKvpS2WqnPtSwF8KPv8="
# TWINE_PASSWORD to deploy to PyPI
- secure: "md4fgPt9RC/sCoN5//5PcNHLUd9gWQGewV5hFpWW88MRTjxTng1Zfs8r7SqlF2AkEEepFfyzq0BEe9c3FMAnFbec3KmqdlQen4V8xDbLrcTlvkPlTrYGbAScUvdhhqojB//hMHoTD4KvxAv9CiUwFBO4hCMmj2buWHUbV9Ksu5WCW9mF/gkt/hIuYAU6Mbwt8PiYyMgUpzMHO1vruofcWRaVnvKwmBqHB0ae86D4/drpwn4CWjlM12WUnphT2bssiyPkw24FZtCN6kPVta6bLZKBxu0bZpw2vbXuUG+Yh19Q4mp8wNYT3XSHJf8Hl5LfujF48+cLWu+6rlCkdcelyVylhWLFc3rGOONAv4G8jWW2yNSz/bLQfJnMpd81fQEu5eySmFxB7mdB0uyKpvIG1jMJQ73LlYKakKLAPdYhMFyQAHoX9gvCE3S4QR95DBMi5gM/pZubOCcMLdjPHB5JKpJHSjxbOzyVwgmsUIEgd5Bi2vZvvYQXn1plk4xpQ3PhXc+/gi33bzY89mKcfOn0HJ2pD1vLqDXRCBsMCakoLZ0JB/6bacaz4FngbsGWuQ+I1cz20lJGL/MSi9bW1G7Uoidt3GXXWDmXrWt70vIXlLIxr8XV0Mu/rPbauGgWE+ZSYEfvdM5sP+FNF7vQ5de+Fkvzg5Z3tTfR+O1W+d7+vM4="
- TWINE_USERNAME=Leonardo.Uieda
- COVERAGE=false
- CHECK=false
- BUILD_DOCS=false
- DEPLOY_DOCS=false
- DEPLOY_PYPI=false
- CONDA_REQUIREMENTS="requirements.txt"
# Get GMT6 from the development channel
- CONDA_EXTRA_CHANNEL=conda-forge/label/dev
matrix:
# Build under the following configurations
include:
- os: linux
env:
- PYTHON=3.5
- BUILD_DOCS=true
- os: linux
env:
- PYTHON=3.6
- COVERAGE=true
- CHECK=true
- BUILD_DOCS=true
- DEPLOY_DOCS=true
- DEPLOY_PYPI=true
- os: osx
env:
- PYTHON=3.5
- BUILD_DOCS=true
- os: osx
env:
- PYTHON=3.6
- COVERAGE=true
- BUILD_DOCS=true
before_install:
# Get the Fatiando CI scripts
- git clone https://github.com/fatiando/continuous-integration.git
# Download and install miniconda and setup dependencies
# Need to source the script to set the PATH variable globaly
- source continuous-integration/travis/setup-miniconda.sh
- if [ "$COVERAGE" == "true" ]; then
pip install codecov codacy-coverage codeclimate-test-reporter;
fi
# Show installed pkg information for postmortem diagnostic
- conda list
install:
# Package and install
- python setup.py bdist_wheel
- pip install dist/*
script:
# Check code for style and lint for code quality
# Black is Python 3.6 only so it can't be in the requirements file.
- if [ "$CHECK" == "true" ]; then
conda install --yes --quiet black python=$PYTHON;
make check;
fi
# Run the test suite. Make pytest report any captured output on stdout or stderr.
- if [ "$COVERAGE" == "true" ]; then
make coverage PYTEST_EXTRA="-r P";
else
make test PYTEST_EXTRA="-r P";
fi
# Build the documentation
- if [ "$BUILD_DOCS" == "true" ]; then
make -C doc all;
fi
after_success:
- if [ "$COVERAGE" == "true" ]; then
echo "Uploading coverage to Codecov";
codecov -e PYTHON;
coverage xml;
echo "Uploading coverage to Codacy";
python-codacy-coverage -r coverage.xml;
echo "Uploading coverage to Code Climate";
codeclimate-test-reporter;
fi
deploy:
# Make a release on PyPI
- provider: script
script: continuous-integration/travis/deploy-pypi.sh
on:
tags: true
condition: '$DEPLOY_PYPI == "true"'
# Push the built HTML in doc/_build/html to the gh-pages branch
- provider: script
script: continuous-integration/travis/deploy-gh-pages.sh
skip_cleanup: true
on:
branch: master
condition: '$DEPLOY_DOCS == "true"'
# Push HTML when building tags as well
- provider: script
script: continuous-integration/travis/deploy-gh-pages.sh
skip_cleanup: true
on:
tags: true
condition: '$DEPLOY_DOCS == "true"'
notifications:
email: false
webhooks:
# Integration for Gitter
urls:
- https://webhooks.gitter.im/e/648c8355310c2ef3df4f
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: never # options: [always|never|change] default: always