forked from NerdWalletOSS/dynamorm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·30 lines (23 loc) · 843 Bytes
/
build.sh
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
#!/bin/bash
set -eux
SERIALIZATION_PKG=${SERIALIZATION_PKG:-marshmallow}
TRAVIS_PULL_REQUEST=${TRAVIS_PULL_REQUEST:-false}
if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
if [ -z "`git diff origin/master setup.py | grep '\+.*version='`" ]; then
printf "\n\n\n\nBump version in setup.py!\n\n\n\n"
exit 1
fi
fi
pip install -e .
pip install codecov pytest pytest-mock
pip install ${SERIALIZATION_PKG}
SERIALIZATION_PKG=${SERIALIZATION_PKG} coverage run --source=dynamorm $(which py.test) -v tests/
# only build docs on py2.7
if [ "${TRAVIS_PYTHON_VERSION}" = "2.7" ]; then
pip install travis-sphinx
travis-sphinx build --source docs
# push if we have a token and this isn't a pr build
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ ! -z "${GH_TOKEN}" ]; then
travis-sphinx deploy
fi
fi