Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
132 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,26 @@ | ||
language: python | ||
|
||
python: | ||
- 2.6 | ||
- 2.7 | ||
- 3.2 | ||
- 3.3 | ||
- pypy | ||
|
||
env: | ||
matrix: | ||
- NUMPY="true" | ||
- NUMPY="false" | ||
|
||
matrix: | ||
exclude: | ||
- python: pypy | ||
env: NUMPY="true" | ||
- TOX_ENV=py33 | ||
- TOX_ENV=py33-numpy | ||
- TOX_ENV=py32 | ||
- TOX_ENV=py27 | ||
- TOX_ENV=py27-numpy | ||
- TOX_ENV=py26 | ||
- TOX_ENV=pypy | ||
- TOX_ENV=docs-py3 | ||
|
||
before_install: | ||
- export PYTHON_EXE=python | ||
- export EASY_SETUP_URL='http://peak.telecommunity.com/dist/ez_setup.py' | ||
|
||
install: | ||
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install --use-mirrors unittest2; fi | ||
- if [[ $NUMPY == "true" ]]; then pip install numpy; fi | ||
- pip install --use-mirrors coveralls | ||
- pip install --use-mirrors 'pytest>=2.3.5' 'pytest-cov>=1.6' | ||
- pip install --use-mirrors -r requirements.txt | ||
|
||
before_script: | ||
- if [[ $TRAVIS_PYTHON_VERSION == "3.3" ]]; then export PYTHONHASHSEED=4; fi | ||
- if [[ $TRAVIS_PYTHON_VERSION == "3.4" ]]; then export PYTHONHASHSEED=8; fi | ||
- pip install --use-mirrors tox coveralls | ||
|
||
script: | ||
- $PYTHON_EXE setup.py develop | ||
- py.test -v --cov hamcrest | ||
- tox -e $TOX_ENV | ||
|
||
after_success: | ||
- coveralls | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER Chris Rose <offline@offby1.net> | ||
|
||
# ensure the base image has what we need | ||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get -yqq install \ | ||
build-essential python-pip \ | ||
software-properties-common openjdk-7-jdk && \ | ||
add-apt-repository ppa:fkrull/deadsnakes && \ | ||
apt-get update | ||
|
||
# install legacy python versions | ||
RUN DEBIAN_FRONTEND=noninteractive apt-get -yqq install \ | ||
python2.5 python2.6 python2.7 python3.1 python3.2 python3.3 python3.4 | ||
|
||
# add Jython installer | ||
# ADD jython-installer-2.7-b4.jar /tmp/ | ||
ADD http://search.maven.org/remotecontent?filepath=org/python/jython-installer/2.7-b4/jython-installer-2.7-b4.jar /tmp/jython-installer-2.7-b4.jar | ||
|
||
# install pypy versions | ||
# ADD pypy-2.5.0-linux64.tar.bz2 /opt/ | ||
# ADD pypy3-2.4.0-linux64.tar.bz2 /opt/ | ||
RUN mkdir -p /opt | ||
ADD https://bitbucket.org/pypy/pypy/downloads/pypy3-2.4.0-linux64.tar.bz2 /tmp/ | ||
RUN cd /opt && tar -xf /tmp/pypy3-2.4.0-linux64.tar.bz2 | ||
ADD https://bitbucket.org/pypy/pypy/downloads/pypy-2.5.0-linux64.tar.bz2 /tmp/ | ||
RUN cd /opt && tar -xf /tmp/pypy-2.5.0-linux64.tar.bz2 | ||
|
||
# install Jython version | ||
RUN java -jar /tmp/jython-installer-2.7-b4.jar -d /opt/jython-2.7-b4 -s -t all | ||
ENV PATH /opt/jython-2.7-b4/bin:$PATH | ||
# bootstrap jython JAR cache | ||
RUN jython | ||
|
||
# make PyPy available | ||
ENV PATH /opt/pypy-2.5.0-linux64/bin:/opt/pypy3-2.4.0-linux64/bin:$PATH | ||
|
||
ENV PYTHON_BUILD_DOCKER=true | ||
|
||
# install tox | ||
RUN pip install tox | ||
|
||
ADD clean-launch.sh /tools/clean-launch.sh | ||
|
||
VOLUME /src | ||
WORKDIR /src | ||
|
||
ENTRYPOINT ["/tools/clean-launch.sh"] | ||
CMD ["tox"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Test hamcrest with Docker | ||
|
||
## Simple testing steps | ||
|
||
(this assumes that you have [Docker](https://docker.com) installed) | ||
|
||
1. cd to the directory containing PyHamcrest's `tox.ini` file. | ||
2. run `docker run --rm -v $(pwd):/src chrisr/pybuilder:latest` | ||
|
||
That's it! | ||
|
||
This will test PyHamcrest with all supported versions of Python | ||
|
||
## Tweaking the build image | ||
|
||
1. in this directory, modify the `Dockerfile` to have the setup you want | ||
2. `docker build --tag $USER/pybuilder:latest .` | ||
3. run your build | ||
4. submit a pull request to the `hamcrest/PyHamcrest` repo with your | ||
changes to the Dockerfile | ||
|
||
We'll merge and publish the new tag to `chrisr/pybuilder:latest`, | ||
making the new instructions up to date. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
find /src \( -name __pycache__ -o -name '*.pyc' \) -delete | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
addopts = --cov hamcrest --cov-report term-missing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters