forked from Parisson/TimeSide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (51 loc) · 2.11 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
language: python
sudo: required
services:
- docker
env:
matrix:
- TEST_TARGET=default # Default unit test
- TEST_TARGET=doc # Test documentation and included doctest
- TEST_TARGET=server # Test timeside.server
before_install:
- docker-compose --version
# Install TimeSide
install:
- docker-compose -f docker-compose.yml -f env/build.yml build
- docker-compose -f docker-compose.yml -f env/front_build.yml run front_build
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 tests/run_all_tests";
fi
# -------------DOC------------------------
- if [[ $TEST_TARGET == 'doc' ]]; then
docker-compose -f docker-compose.yml -f env/build.yml run app sh -c "cd /srv/lib/timeside/docs; pip install sphinx numpydoc; make html; make doctest";
fi
# # -------------CLI-------------------------
- if [[ $TEST_TARGET == 'cli' ]]; then
docker-compose -f docker-compose.yml -f env/build.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;
sleep 20;
docker-compose exec app python3 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";
fi
after_script:
- if [[ $TEST_TARGET == 'server' ]]; then
docker-compose stop;
fi
after_failure:
- if [[ $TEST_TARGET == 'server' ]]; then
docker-compose logs;
fi