Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add release testing to TravisCI #665

Merged
merged 2 commits into from
Feb 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
sudo: false
language: python
cache: pip
python:
- 2.7
- 3.3
Expand All @@ -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
email: false
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
34 changes: 19 additions & 15 deletions release-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down