Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
test: pypy on travis and #560 (#790)
Browse files Browse the repository at this point in the history
* test: separate test-requirements.txt -> base-test-requirements.txt

(retain history)

* test: add pypy-test-requirements.txt to avoid wsaccel

fixes #560

* test: test pypy on travis

(unfortunately only pypy-5.4.1)

also some cleanup of the travis env, split flake8 into its own matrix
so its ran concurrently and enable pip caching
  • Loading branch information
pjenvey authored and bbangert committed Jan 27, 2017
1 parent 81e3af4 commit a38660a
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 25 deletions.
21 changes: 12 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
language: python
cache: pip
sudo: required
dist: precise
python:
- '2.7'

matrix:
include:
- python: 2.7
env: TOXENV=py27 DDB=true CODECOV=true
- python: pypy-5.4.1
env: TOXENV=pypy DDB=true CODECOV=true
- env: TOXENV=flake8

install:
- pip install virtualenv
- virtualenv pypy
- cd pypy/bin && ln -s python pypy && cd ../..
- source pypy/bin/activate
- python --version
- make travis
- make ${DDB:+ddb} travis
script: tox -- --with-coverage --cover-xml --cover-package=autopush
after_success:
- codecov
- ${CODECOV:+codecov}
notifications:
slack:
secure: LE+1Nelh5PLrb35LU6yJI1EV2LDVm4V90Tb+5LhUpeGrcfqr47HhMLMGXbBSnnjYPRLCiT75xog+oMN5eAF4VnZle4qza6Ue7G+YwRtGo/V0ud0i2zSUT557yXcr2QCYAzTKJVgetnxQNYvru/l1trdNZsRbsPUm1vexAjaX5yo=
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ BUILD_DIRS = bin build deps include lib lib64 lib_pypy lib-python\

all: build

travis: $(HERE)/ddb $(BIN)/tox
travis:
pip install coverage nose mock moto codecov tox

$(HERE)/ddb:
ddb:
mkdir $@
curl -sSL http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz | tar xzvC $@

Expand Down Expand Up @@ -58,7 +58,7 @@ build: $(BIN)/pip
$(INSTALL) -r $(REQS)
$(PYTHON) setup.py develop

test: $(BIN)/tox $(HERE)/ddb
test: $(BIN)/tox ddb
$(BIN)/tox

coverage: $(BIN)/tox
Expand Down
11 changes: 11 additions & 0 deletions base-test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
nose
coverage
mock>=1.0.1
funcsigs==1.0.2
pbr==1.10.0
-e git+https://github.com/habnabit/txstatsd.git@master#egg=txStatsD
-e git+https://github.com/bbangert/moto.git@3bdb75a961148ea5aa526f0e88d9e7835a30df3a#egg=moto
flake8==3.2.0
psutil
websocket-client
Pympler==0.4.3
2 changes: 2 additions & 0 deletions pypy-test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r pypy-requirements.txt
-r base-test-requirements.txt
12 changes: 1 addition & 11 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
-r requirements.txt
nose
coverage
mock>=1.0.1
funcsigs==1.0.2
pbr==1.10.0
-e git+https://github.com/habnabit/txstatsd.git@master#egg=txStatsD
-e git+https://github.com/bbangert/moto.git@3bdb75a961148ea5aa526f0e88d9e7835a30df3a#egg=moto
flake8==3.2.0
psutil
websocket-client
Pympler==0.4.3
-r base-test-requirements.txt
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = python,flake8
envlist = py27,pypy,flake8

[testenv]
deps = -rtest-requirements.txt
Expand All @@ -9,6 +9,10 @@ commands =
nosetests {posargs} --with-object-tracker autopush
install_command = pip install --pre {opts} {packages}

[testenv:pypy]
basepython = pypy
deps = -rpypy-test-requirements.txt

[testenv:flake8]
commands = flake8 autopush
deps = -rtest-requirements.txt
deps = -rbase-test-requirements.txt

0 comments on commit a38660a

Please sign in to comment.