Update CI build process

This commit is contained in:
enkore 2014-12-01 14:48:42 +01:00
parent e8bfec5710
commit 007d4dd484
3 changed files with 23 additions and 5 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ build/*
dist/*
*.egg-info/*
*~
ci-build

View File

@ -6,8 +6,4 @@ cache:
- $HOME/virtualenv/python3.3.5/lib/python3.3/site-packages
install:
- "pip install -r dev-requirements.txt"
script:
- "pep8 --ignore E501 i3pystatus tests"
- "PYTHONPATH=. py.test" # run unit tests
- "python setup.py -q install" # test install
- "sphinx-build -W docs html" # test building docs
script: "./ci-build.sh"

21
ci-build.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/bash -xe
# Target directory for all build files
BUILD=${1:-ci-build}
mkdir -p $BUILD
pep8 --ignore E501 i3pystatus tests
PYTHONPATH=. py.test --junitxml ${BUILD}/testlog.xml tests
# Check that the setup.py script works
rm -rf ${BUILD}/test-install ${BUILD}/test-install-bin
mkdir ${BUILD}/test-install ${BUILD}/test-install-bin
PYTHONPATH=${BUILD}/test-install python setup.py --quiet install --install-lib ${BUILD}/test-install --install-scripts ${BUILD}/test-install-bin
test -f ${BUILD}/test-install-bin/i3pystatus
# Check that the docs build w/o warnings (-W flag)
sphinx-build -b html -W docs ${BUILD}/docs/