From 007d4dd484b18f8705be76f4a8e8df2c8f225bdf Mon Sep 17 00:00:00 2001 From: enkore Date: Mon, 1 Dec 2014 14:48:42 +0100 Subject: [PATCH] Update CI build process --- .gitignore | 1 + .travis.yml | 6 +----- ci-build.sh | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100755 ci-build.sh diff --git a/.gitignore b/.gitignore index 5851913..ec3c9b5 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ build/* dist/* *.egg-info/* *~ +ci-build diff --git a/.travis.yml b/.travis.yml index cb77e24..68692b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/ci-build.sh b/ci-build.sh new file mode 100755 index 0000000..8f71b5d --- /dev/null +++ b/ci-build.sh @@ -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/ + +