2018-09-05 09:57:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
|
2018-09-05 20:38:50 +02:00
|
|
|
# minimal test requirements for py27 testing
|
2018-09-05 21:04:26 +02:00
|
|
|
python -m pip install -U pip
|
2018-09-05 20:38:50 +02:00
|
|
|
python -m pip install pytest rst2html5
|
|
|
|
|
|
2018-09-05 09:57:52 +02:00
|
|
|
rst2html5 --strict README.rst > /dev/null
|
|
|
|
|
rst2html5 --strict CHANGELOG.rst > /dev/null
|
|
|
|
|
|
|
|
|
|
# first test module from installed wheel
|
|
|
|
|
python -m pip install $(ls -1t dist/pycalver*.whl | head -n 1)
|
2018-09-05 21:05:38 +02:00
|
|
|
grep 'coding: utf-8' $(python -c 'import pycalver;print(pycalver.__file__.replace(".pyc", ".py"))')
|
2018-09-05 20:33:39 +02:00
|
|
|
python -m pytest test/
|
2018-09-05 09:57:52 +02:00
|
|
|
|
2018-09-05 21:54:34 +02:00
|
|
|
if [[ $(python -c "import sys;sys.exit(sys.version[:3] < '3.6')") ]]; then
|
2018-09-05 20:33:39 +02:00
|
|
|
python -m pip install $(cat requirements-test.txt)
|
2018-09-05 09:57:52 +02:00
|
|
|
python -m flake8 src/pycalver/
|
|
|
|
|
|
2018-09-05 20:22:28 +02:00
|
|
|
MYPYPATH=stubs/ python -m mypy src/pycalver/;
|
2018-09-05 09:57:52 +02:00
|
|
|
|
|
|
|
|
# next test module from src/
|
2018-09-05 20:22:28 +02:00
|
|
|
PYTHONPATH=src/:$PYTHONPATH python -m pytest --cov=pycalver test/;
|
2018-09-05 20:33:39 +02:00
|
|
|
codecov
|
2018-09-05 09:57:52 +02:00
|
|
|
fi
|
|
|
|
|
|