Skip to content

Commit

Permalink
[travis] reset python
Browse files Browse the repository at this point in the history
  • Loading branch information
yomguy committed Nov 26, 2019
1 parent c7944ac commit 3c56dc4
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .travis.yml
@@ -1,3 +1,5 @@
language: python

sudo: required

services:
Expand All @@ -6,6 +8,7 @@ services:
env:
matrix:
- TEST_TARGET=default # Default unit test
- TEST_TARGET=cli # Test for TimeSide command line interfaces
- TEST_TARGET=doc # Test documentation and included doctest
- TEST_TARGET=server # Test timeside.server

Expand All @@ -22,26 +25,30 @@ install:
script:
# -------------DEFAULT--------------------
- if [[ $TEST_TARGET == 'default' ]]; then
docker-compose -f docker-compose.yml -f env/build.yml -f env/coverage.yml run app sh -c "cd /srv/lib/timeside; pip install -U coverage; coverage run --source=timeside --omit=timeside/plugins/analyzer/external/yaafe.py setup.py test";
docker-compose -f docker-compose.yml -f env/coverage.yml run app sh -c "cd /srv/lib/timeside; pip install -U coverage; coverage run --source=timeside --omit=timeside/plugins/analyzer/external/yaafe.py setup.py test";
fi
# -------------DOC------------------------
- if [[ $TEST_TARGET == 'doc' ]]; then
docker-compose -f docker-compose.yml run app sh -c "cd /srv/lib/timeside/docs; pip install sphinx numpydoc; make html; make doctest";
fi
# -------------SERVER-------------------------
# Get environment variables from .env file and run test
# # -------------CLI-------------------------
- if [[ $TEST_TARGET == 'cli' ]]; then
docker-compose -f docker-compose.yml run app sh -c "cd /srv/lib/timeside; ./tests/test_scripts.sh";
fi
# # -------------SERVER-------------------------
# # Get environment variables from .env file and run test
- if [[ $TEST_TARGET == 'server' ]]; then
docker-compose -f docker-compose.yml up -d db;
sleep 20;
docker-compose -f docker-compose.yml -f env/build.yml -f env/nginx.yml up -d;
docker-compose -f docker-compose.yml -f env/nginx.yml up -d;
sleep 20;
docker-compose exec app python manage.py test timeside.server.tests;
fi
#
after_success:
# - # -------------DEFAULT--------------------
- if [[ $TEST_TARGET == 'default' ]]; then
docker-compose -f docker-compose.yml -f env/build.yml -f env/coverage.yml run app sh -c "cd /srv/lib/timeside; pip install coveralls; coveralls";
docker-compose -f docker-compose.yml -f env/coverage.yml run app sh -c "cd /srv/lib/timeside; pip install coveralls; coveralls";
fi

after_script:
Expand Down

0 comments on commit 3c56dc4

Please sign in to comment.