forked from metabrainz/listenbrainz-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
57 lines (51 loc) · 2.96 KB
/
.travis.yml
File metadata and controls
57 lines (51 loc) · 2.96 KB
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
language: python
services:
- docker
install:
- cp listenbrainz/config.py.sample listenbrainz/config.py
- cp listenbrainz_spark/config.py.sample listenbrainz_spark/config.py
# Build the unit test docker-compose project
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test build
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test run --rm listenbrainz
dockerize
-wait tcp://db:5432 -timeout 60s
-wait tcp://influx:8086 -timeout 60s bash -c
"python3 manage.py init_db --create-db &&
python3 manage.py init_msb_db --create-db &&
python3 manage.py init_influx"
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test stop
# Build the integration test docker-compose project
- docker-compose -f docker/docker-compose.integration.yml -p listenbrainz_int build
- docker-compose -f docker/docker-compose.integration.yml -p listenbrainz_int run --rm listenbrainz
dockerize
-wait tcp://db:5432 -timeout 60s
-wait tcp://influx:8086 -timeout 60s bash -c
"python3 manage.py init_db --create-db &&
python3 manage.py init_msb_db --create-db &&
python3 manage.py init_influx"
- docker-compose -f docker/docker-compose.integration.yml -p listenbrainz_int stop
script:
# First run unit tests and bring containers down then
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test up -d db influx redis
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test run --rm listenbrainz
dockerize
-wait tcp://db:5432 -timeout 60s
-wait tcp://influx:8086 -timeout 60s
-wait tcp://redis:6379 -timeout 60s
"py.test"
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test down
# Bring up integration test containers, run tests and bring them down
- docker-compose -f docker/docker-compose.integration.yml -p listenbrainz_int up -d db influx redis influx_writer rabbitmq
- sleep 10
- docker-compose -f docker/docker-compose.integration.yml -p listenbrainz_int
run --rm listenbrainz dockerize
-wait tcp://db:5432 -timeout 60s
-wait tcp://influx:8086 -timeout 60s
-wait tcp://redis:6379 -timeout 60s
-wait tcp://rabbitmq:5672 -timeout 60s
bash -c "py.test listenbrainz/tests/integration"
- docker-compose -f docker/docker-compose.integration.yml -p listenbrainz_int down
- echo "JavaScript tests start here"
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test run --rm frontend_tester npm test
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test run --rm frontend_tester npm run type-check
- docker-compose -f docker/docker-compose.test.yml -p listenbrainz_test run --rm frontend_tester npm run format:ci