-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
109 lines (99 loc) · 4.82 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
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: "tL6nQqxTxWff3iYsLtxclshzMEkl2x4HJMzCoQUxi8oMIPpI4KFderQl7nMOd6Pski6AAZRKoEfx70FfdZdtn+96ogykqmh2cHKYpkGF5WMkbC8NqOds3xscKMoPQ5liXwHkpjeDwTUXYmU7kTdEGPewnrJLCHVkbjeT/RRKezuBNZZNpO7IaWQ08i+yf0ubu3OW/aiArQD+Vx3S/xsICNoo10SSvfIhKTB1BSaqSrBqZJsHaiz84lXVJPBiQo7wqZt83G/mIBj6aNmymXMKMjhQKuzVYiETva45W2exjjKQ4n8qYHBp48bKeJbcmc97A9lMVHijMGKC6IqyBSwal5v1/Z12VjAOyI10aU7xssn/6UQnmxBRSTueINW/Z9sFMdlMTTfgD2EUinnowJgJS09JfX6ZRcxmx+vOORjy9+RJZWYexX9KOLNw9JWOnBhE0L8XmVfj5FtFvOqlQ2AKfJGV9GO/vRSAl82ckFcjua2oJS+FoHCeMks5+b/wxtKnGK0bx6JOPAq5/PLMr9uYTY/o4YmhGqU3Q9wTZCLZum7+EYppcwdFhR2/O2XGRjucPrXdG5E7Bu8WMpCRM5198scOL3+SRHPBOIJ5sKQMACyvzQwgNDaeauvH80f+VT/Wf+5hD7YJPHc5GDOrerjhQ3U+fB1+ItiFafrqVAy2EPg="
# Github Token for pushing the built docs (GH_TOKEN)
- secure: "bi+1FnJmiXy2ln3SuhzolA+oUR/GnnbeZVj84B8DvbuF1Is0OM5y0Rj66hQ7TG8r48uJMvJSk+KfAoqgDyqwkTg46cop4cgG3Dwl1pIpJm518ij5DfIZbQzvsgLJZ7a45+Pfzd6wdqtdKXrFN3Db56SErDn7eEbGEdrw6auVhmj0aPZV5MB7zJipNR+LvIr0b1B5+iGIf79OXWV9aeiU6Bg1VLOofqBEY10taGB3gXiGyk0Umywhy61Oh2iJMrOt4CwQeTfLUyOM00t/lC86WnRdhhxY8DZHvvVPFPYm7u+LuA+pPkoadrw6r2WQxR3QN4hqSS5ZUpYDfV8zg8t0nRkwVZ4pubNaj6vWwvWXJqXt/BwQaDirbZ6Bavedjv/WAjrwH4rBh1BOaWHsycU+j62wwVaFEcDda85nrhfqhXAEijzcxDR/2QGfNu+b9LrDZOC+IlzyT7FA0UBS+4bspMP6n69LcdCt2bTNvtNNffD6iplFA8uVXIlFLM4JYsr60bBrlIszcXbRoqx82P1lmslp2F5ypMqeh2aME1epLZ4EUcwOWtzPkJyjgDfK6yL7N6XpZ6eD+5lkW7lbpJ7zVW6+CZAn16CrqSxPZ8Wki3eiG5SK9T2Z0lMrDJXaRLMhJO5fpTA742szVrD8ofOOItg+qCzOrpXPAkQc+6UrTTg="
# TWINE_PASSWORD to deploy to PyPI
- secure: "cLUT37VtuqehLiSaotPj6g3duHQfZLLPHo/D3G4Kw3OIFA3xcUsxmLw5YygE/3aSvx6Hw9h4rT+DAFbNBKgYpOT1EjuEWAjMxxH0+ppmCfuT9ns29eUS1xU06aXQoXdIflRWwiY4tpPC9g/42eyex/7IcPyJ2BLwLcMtYkuKBXto8xXJhWtSnE1poHyzVH2G6kqDIwzWSTQl97equ9bDjmf1tppMvAfZSuw5Xg5fbZh013foqhO2FzES+JfMLiJbPDMGK6ub49oKGNdvFa+fHLp350wFFMXSbBVTcmE5YksGGUsJFFtiGYBfEmj+DbjYad8vQG40raNo3WNG3/H5gsMvfdxVUcYTWtYrljhrhh2HZ08L4gB49ik9Mi2qhi23XLz0G78BxNU1O+iC6lR02DumvWgDPH3JGd1zRIoQbo9xjiWYAFrDqtjNMh5aYH28qEJ0VCmJb7CbXC8dgnIpp+ypneU0W4Q/It0osxjdLBp3Lu/LIFQY/cVqLJHvacKYW/Wo22gwPlx6qtVtZTWPWWl8R3Y5+61jPhXNb3EYHPi46QVl2E1f4gsEq/PR2tIDre/sL+5k8d9k5R6apxJ+stFB0zpiI1I7g7qO9GNzqIz4dY5TdKyTifJCo4pnoSM5X6CfuUOy0WR1KUV5xrawlz1OuMBDok0Pvxvn5Him0/M="
- TWINE_USERNAME=Leonardo.Uieda
- COVERAGE=false
- BUILD_DOCS=false
- DEPLOY_DOCS=false
- DEPLOY_PYPI=false
- CONDA_FLAGS="-c conda-forge --yes --quiet"
matrix:
# Build under the following configurations
include:
- os: linux
env:
- PYTHON=3.5
- os: linux
env:
- PYTHON=3.6
- COVERAGE=true
- BUILD_DOCS=true
- DEPLOY_DOCS=true
- DEPLOY_PYPI=true
before_install:
# Get Miniconda from Continuum
# Need to source the script to set the PATH variable in this environment
# (not the scripts environment)
- source ci/install-miniconda.sh
- conda update conda $CONDA_FLAGS
# Install dependencies
- conda install python=$PYTHON pip $CONDA_FLAGS
- conda install --file requirements.txt $CONDA_FLAGS
- 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 PEP8 style and lint for code quality
- make pep8
- make lint
# Run the test suite
- if [ "$COVERAGE" == "true" ]; then
make coverage;
else
make test;
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:
# Push the built docs to Github pages
- provider: script
script: ci/deploy-docs.sh
skip_cleanup: true
on:
branch: master
condition: '$DEPLOY_DOCS == "true"'
# Push docs when building tags as well
- provider: script
script: ci/deploy-docs.sh
skip_cleanup: true
on:
tags: true
condition: '$DEPLOY_DOCS == "true"'
# Make a release on PyPI
- provider: script
script: ci/deploy-pypi.sh
on:
tags: true
condition: '$DEPLOY_PYPI == "true"'
notifications:
email: false