forked from octodns/octodns-cloudflare
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcibuild
executable file
·39 lines (33 loc) · 1.37 KB
/
cibuild
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
#!/bin/sh
set -e
cd "$(dirname "$0")/.."
echo "## bootstrap ###################################################################"
script/bootstrap
if [ -z "$VENV_NAME" ]; then
VENV_NAME="env"
fi
. "$VENV_NAME/bin/activate"
echo "## environment & versions ######################################################"
python --version
pip --version
echo "## clean up ####################################################################"
find octodns_cloudflare tests* -name "*.pyc" -exec rm {} \;
rm -f *.pyc
echo "## begin #######################################################################"
# For now it's just lint...
echo "## lint ########################################################################"
script/lint
echo "## tests/coverage ##############################################################"
script/coverage
echo "## validate setup.py build #####################################################"
python setup.py build
echo "## validate setup.py install ###################################################"
deactivate
TMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX)
python3 -m venv $TMP_DIR
. "$TMP_DIR/bin/activate"
python setup.py install
echo "## validate tests can run against installed code ###############################"
pip install pytest pytest-network requests_mock
pytest --disable-network
echo "## complete ####################################################################"