-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
ci.sh
executable file
·36 lines (28 loc) · 1.05 KB
/
ci.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
31
32
33
34
35
36
#!/bin/bash
set -exu -o pipefail
pip install -U pip setuptools wheel
python setup.py sdist --formats=zip
pip install dist/*.zip
# Make sure that the docs build without warnings. And this also acts as a
# basic smoke test on the code, since the docs use the code.
pushd docs
# -n (nit-picky): warn on missing references
# -W: turn warnings into errors
sphinx-build -nW -b html source build
popd
pip install -Ur test-requirements.txt
# https://serverfault.com/questions/7503/how-to-determine-if-a-bash-variable-is-empty
if [ -n "${OLD_SPHINX}" ]; then
pip install "sphinx == ${OLD_SPHINX}.*"
fi
mkdir empty
pushd empty
INSTALLDIR=$(python -c "import os, sphinxcontrib_trio; print(os.path.dirname(sphinxcontrib_trio.__file__))")
pytest ../tests --cov="$INSTALLDIR" --cov=../tests --cov-config="../.coveragerc"
mv .coverage firstrun
# Run tests again with minimal dependencies installed
pip uninstall -y async_generator contextlib2
pytest ../tests --cov="$INSTALLDIR" --cov=../tests --cov-config="../.coveragerc"
coverage combine -a firstrun
pip install codecov
codecov