Add gitlab CI tests
[pygobject.git] / .gitlab-ci / test-docker.sh
blob60a257611600ed6ea030e7d1cb30205185c6a2b4
1 #!/bin/bash
3 set -e
5 virtualenv --python="${PYTHON}" /tmp/venv
6 source /tmp/venv/bin/activate
8 python -m pip install git+https://github.com/pygobject/pycairo.git
9 python -m pip install pyflakes pycodestyle
11 export PKG_CONFIG_PATH=/tmp/venv/share/pkgconfig
12 export MALLOC_CHECK_=3
13 export MALLOC_PERTURB_=$((${RANDOM} % 255 + 1))
14 PYVER=$(python -c "import sys; sys.stdout.write(str(sys.version_info[0]))")
16 # BUILD
17 ./autogen.sh --with-python=python
18 make
20 # TESTS
21 xvfb-run -a make check
23 # CODE QUALITY CHECKS
24 make check.quality
26 # DOCUMENTATION CHECKS
27 if [[ "${PYVER}" == "2" ]]; then
28 python -m pip install sphinx sphinx_rtd_theme
29 python -m sphinx -W -a -E -b html -n docs docs/_build
30 fi;