Skip to content

Commit dff56ff

Browse files
committed
add release testing to TravisCI
1 parent 98b2f4c commit dff56ff

File tree

3 files changed

+25
-16
lines changed

3 files changed

+25
-16
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sudo: false
22
language: python
3+
cache: pip
34
python:
45
- 2.7
56
- 3.3
@@ -10,9 +11,13 @@ os:
1011
- linux
1112
install:
1213
- pip install tox-travis
14+
jobs:
15+
include:
16+
- stage: release-test
17+
script: RELEASE_SKIP=head ./release-test.sh
1318
script: tox
1419
branches:
1520
only:
1621
- master
1722
notifications:
18-
email: false
23+
email: false

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ install: FORCE
5656
dist: dist/${MODULE}-$(VERSION).tar.gz
5757

5858
dist/${MODULE}-$(VERSION).tar.gz: $(SOURCES)
59-
./setup.py sdist
59+
./setup.py sdist bdist-wheel
6060

6161
## clean : clean up all temporary / machine-generated files
6262
clean: FORCE

release-test.sh

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,28 @@ pipver=7.0.2 # minimum required version of pip
1212
rm -Rf testenv? || /bin/true
1313

1414
export HEAD=`git rev-parse HEAD`
15-
virtualenv testenv1
15+
16+
if [ "${RELEASE_SKIP}" != "head" ]
17+
then
18+
virtualenv testenv1
19+
# First we test the head
20+
source testenv1/bin/activate
21+
rm testenv1/lib/python-wheels/setuptools* \
22+
&& pip install --force-reinstall -U pip==${pipver} \
23+
&& pip install setuptools==20.10.1 wheel
24+
make install-dep
25+
make test
26+
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
27+
mkdir testenv1/not-${module}
28+
# if there is a subdir named '${module}' py.test will execute tests
29+
# there instead of the installed module's tests
30+
pushd testenv1/not-${module}; ../bin/${run_tests}; popd
31+
fi
32+
1633
virtualenv testenv2
1734
virtualenv testenv3
1835
virtualenv testenv4
1936

20-
# First we test the head
21-
source testenv1/bin/activate
22-
rm testenv1/lib/python-wheels/setuptools* \
23-
&& pip install --force-reinstall -U pip==${pipver} \
24-
&& pip install setuptools==20.10.1 wheel
25-
make install-dep
26-
make test
27-
pip uninstall -y ${package} || true; pip uninstall -y ${package} || true; make install
28-
mkdir testenv1/not-${module}
29-
# if there is a subdir named '${module}' py.test will execute tests
30-
# there instead of the installed module's tests
31-
pushd testenv1/not-${module}; ../bin/${run_tests}; popd
32-
3337

3438
# Secondly we test via pip
3539

0 commit comments

Comments
 (0)