Skip to content

Commit

Permalink
Travis build using docker.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbeced committed Mar 11, 2016
1 parent 3a28a7f commit 9097da9
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 23 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
MANIFEST
doc/_build
.idea
.coverage
.ipynb_checkpoints
.ropeproject

data
dist
build
PyAlgoTrade.egg-info
Expand Down
14 changes: 6 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ services:

before_install:
- docker pull gbecedillas/pyalgotrade:0.17
# - docker run gbecedillas/pyalgotrade:0.17
# - sudo pip install coveralls
- cp travis/Dockerfile .
- docker build -t testcases .

# command to run tests
# optimizer_testcase is ignored because it gets blocked in Travis.
script:
# - export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
# - nosetests --ignore-files=optimizer_testcase --with-coverage --cover-package=pyalgotrade
# TODO: Pass TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET, TWITTER_ACCESS_TOKEN and TWITTER_ACCESS_TOKEN_SECRET to docker.
- docker run --name testcases testcases /bin/bash -c "cd /tmp/testcases; ./run_tests.sh"

#after_success:
# - coveralls
# after_success:
# - coveralls
5 changes: 5 additions & 0 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@

docker build -t pyalgotrade:0.17 .
# docker rmi $(docker images --quiet --filter "dangling=true")

# docker tag pyalgotrade:0.17 gbecedillas/pyalgotrade:0.17
# docker login --username=gbecedillas [email protected]
# docker push gbecedillas/pyalgotrade:0.17

1 change: 1 addition & 0 deletions release-checklist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Release checklist
[ ] Update version in setup.py.
[ ] Update version in docker/build.sh.
[ ] Update version in docker/Dockerfile
[ ] Update version in travis/Dockerfile
[ ] Update version in .travis.yml.
[ ] Update directories in setup.py.
[ ] Update version doc/conf.py.
Expand Down
13 changes: 13 additions & 0 deletions travis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM pyalgotrade:0.17
MAINTAINER Gabriel Martin Becedillas Ruiz <[email protected]>

RUN pip install nose
RUN pip install coveralls

RUN mkdir /tmp/testcases
COPY travis/run_tests.sh /tmp/testcases
COPY coverage.cfg /tmp/testcases
COPY setup.cfg /tmp/testcases
COPY testcases /tmp/testcases/
COPY samples /tmp/testcases/

8 changes: 0 additions & 8 deletions travis/install_talib_deps.sh

This file was deleted.

7 changes: 0 additions & 7 deletions travis/requirements.txt

This file was deleted.

5 changes: 5 additions & 0 deletions travis/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

nosetests --ignore-files=optimizer_testcase --with-coverage --cover-package=pyalgotrade

0 comments on commit 9097da9

Please sign in to comment.