diff --git a/.travis.yml b/.travis.yml index 955e71fe8..5be45a5df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,6 @@ sudo: false language: python +cache: pip python: - 2.7 - 3.3 @@ -10,9 +11,13 @@ os: - linux install: - pip install tox-travis +jobs: + include: + - stage: release-test + script: RELEASE_SKIP=head ./release-test.sh script: tox branches: only: - master notifications: - email: false \ No newline at end of file + email: false diff --git a/Makefile b/Makefile index 9a3939a91..a184229d6 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,7 @@ install: FORCE dist: dist/${MODULE}-$(VERSION).tar.gz dist/${MODULE}-$(VERSION).tar.gz: $(SOURCES) - ./setup.py sdist + ./setup.py sdist bdist_wheel ## clean : clean up all temporary / machine-generated files clean: FORCE diff --git a/release-test.sh b/release-test.sh index 44074e757..cdc22dad0 100755 --- a/release-test.sh +++ b/release-test.sh @@ -11,25 +11,29 @@ pipver=7.0.2 # minimum required version of pip rm -Rf testenv? || /bin/true -export HEAD=`git rev-parse HEAD` -virtualenv testenv1 +export HEAD=${TRAVIS_PULL_REQUEST_SHA:-$(git rev-parse HEAD)} + +if [ "${RELEASE_SKIP}" != "head" ] +then + virtualenv testenv1 + # First we test the head + source testenv1/bin/activate + rm testenv1/lib/python-wheels/setuptools* \ + && pip install --force-reinstall -U pip==${pipver} \ + && pip install setuptools==20.10.1 wheel + make install-dep + make test + pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install + mkdir testenv1/not-${module} + # if there is a subdir named '${module}' py.test will execute tests + # there instead of the installed module's tests + pushd testenv1/not-${module}; ../bin/${run_tests}; popd +fi + virtualenv testenv2 virtualenv testenv3 virtualenv testenv4 -# First we test the head -source testenv1/bin/activate -rm testenv1/lib/python-wheels/setuptools* \ - && pip install --force-reinstall -U pip==${pipver} \ - && pip install setuptools==20.10.1 wheel -make install-dep -make test -pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install -mkdir testenv1/not-${module} -# if there is a subdir named '${module}' py.test will execute tests -# there instead of the installed module's tests -pushd testenv1/not-${module}; ../bin/${run_tests}; popd - # Secondly we test via pip