Skip to content
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
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
sudo: required

services:
- docker

env:
- PYTHON_BIN=python
- PYTHON_BIN=python3

before_install:
- docker ps
- docker info
- docker version
- make docker
- make linterrors

# TODO: coveralls?
script:
- docker run -i -t -v `pwd`:/app:rw -w /app mrq_local $PYTHON_BIN -m pytest tests/ -v --junitxml=pytest-report.xml --cov mrq --cov-report term

34 changes: 32 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,49 @@
FROM debian:jessie

#
# httpredir.debian.org is often unreliable
# https://github.com/docker-library/buildpack-deps/issues/40
#

RUN echo \
'deb ftp://ftp.us.debian.org/debian/ jessie main\n \
deb ftp://ftp.us.debian.org/debian/ jessie-updates main\n \
deb http://security.debian.org jessie/updates main\n' \
> /etc/apt/sources.list

RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" > /etc/apt/sources.list.d/mongodb-org-3.0.list
RUN apt-get update && \
apt-get install -y curl gcc python-dev mongodb-org-server nginx redis-server && \
apt-get install -y --no-install-recommends \
curl \
gcc \
python-dev \
python-pip \
python3-pip \
python3-dev \
git \
vim \
mongodb-org-server \
nginx redis-server \
&& \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*

RUN curl -s "https://bootstrap.pypa.io/get-pip.py" | python
# Upgrade pip
RUN pip install --upgrade --ignore-installed pip
RUN pip3 install --upgrade --ignore-installed pip

ADD requirements-heroku.txt /app/requirements-heroku.txt
ADD requirements-base.txt /app/requirements-base.txt
ADD requirements-dev.txt /app/requirements-dev.txt
ADD requirements-dashboard.txt /app/requirements-dashboard.txt

RUN pip3 install -r /app/requirements-heroku.txt && \
pip3 install -r /app/requirements-base.txt && \
pip3 install -r /app/requirements-dev.txt && \
pip3 install -r /app/requirements-dashboard.txt && \
rm -rf ~/.cache

RUN pip install -r /app/requirements-heroku.txt && \
pip install -r /app/requirements-base.txt && \
pip install -r /app/requirements-dev.txt && \
Expand Down
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ docker:
docker build -t mrq_local .

test: docker
sh -c "docker run --rm -i -t -p 27017:27017 -p 6379:6379 -p 5555:5555 -p 20020:20020 -v `pwd`:/app:rw -w /app mrq_local py.test tests/ -v --instafail"
sh -c "docker run --rm -i -t -p 27017:27017 -p 6379:6379 -p 5555:5555 -p 20020:20020 -v `pwd`:/app:rw -w /app mrq_local python -m pytest tests/ -v --instafail"

test_jenkins: docker
sh -c "docker run --rm -i -t -p 27017:27017 -p 6379:6379 -p 5555:5555 -p 20020:20020 -v `pwd`:/app:rw -w /app mrq_local /usr/local/bin/py.test tests/ --cov-report=xml --junitxml=test_suite_report.xml --cov mrq"

ssh:
shell:
sh -c "docker run --rm -i -t -p 27017:27017 -p 6379:6379 -p 5555:5555 -p 20020:20020 -p 8000:8000 -v `pwd`:/app:rw -w /app mrq_local bash"

ssh_noport:
shell_noport:
sh -c "docker run --rm -i -t -v `pwd`:/app:rw -w /app mrq_local bash"

docs_serve:
Expand Down
30 changes: 0 additions & 30 deletions circle.yml

This file was deleted.

7 changes: 5 additions & 2 deletions requirements-base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ gevent>=1.1rc3
ujson==1.33
hiredis>=0.1.5
psutil==1.2.1
supervisor==3.0
subprocess32==3.2.7
objgraph==1.8.1
termcolor==1.1.0

subprocess32==3.2.7; python_version < '3.2'

supervisor==3.0; python_version < '3.0'
git+git://github.com/Supervisor/supervisor.git@c18aecf1641d8953767e7010be8bae1924a133bf#egg=Supervisor; python_version >= '3.0'
9 changes: 3 additions & 6 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
pytest==2.7.0
pylint==1.5.2
pytest-cov==1.8.1
pytest-html==1.0
pytest-httpbin==0.0.6
pytest-circleci==0.0.2
pytest-instafail==0.3.0

subprocess32==3.2.5
#git+https://github.com/srlindsay/gevent-profiler@master#egg=gevent-profiler==0.2
# git+https://github.com/srlindsay/gevent-profiler@master#egg=gevent-profiler==0.2

# Used to test IO tracing
requests==2.4.3

mkdocs==0.11.1
mistune==0.5
mkdocs==0.15.3
mistune==0.7.3