-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
41 lines (36 loc) · 1.49 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
sudo: required
language: generic
services:
- docker
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
script:
- set -e
- export HTTP_HOST=nginx
- docker-compose -f docker-compose.yml up -d --build
- sleep 240
- docker-compose -f docker-compose.yml ps
- GEOSERVER_HEALTH=$(docker inspect --format="{{json .State.Health.Status}}" spcgeonode_geoserver_1)
- DJANGO_HEALTH=$(docker inspect --format="{{json .State.Health.Status}}" spcgeonode_django_1)
- |
if [[ "$GEOSERVER_HEALTH" != '"healthy"' ]]; then
echo "GeoServer is $GEOSERVER_HEALTH"
exit 1
fi
- |
if [[ "$DJANGO_HEALTH" != '"healthy"' ]]; then
echo "Django is $DJANGO_HEALTH"
exit 1
fi
# Run the Geonode integration test suite # TODO : reenable this if we manage to have them pass
# - docker-compose -f docker-compose.yml exec postgres psql -U postgres -c "SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity;"
# - docker-compose -f docker-compose.yml exec postgres psql -U postgres -c "CREATE DATABASE test_postgres WITH TEMPLATE postgres;"
# - docker-compose -f docker-compose.yml exec django python manage.py test geonode.tests.integration
- set +e
- echo "Success !"
notifications:
email:
- olivier.dalang@gmail.com