forked from kobotoolbox/kpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
24 lines (21 loc) · 1.03 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
sudo: required
services:
- docker
before_script:
- echo 'Building the KPI base docker image.'
- docker build -t kobotoolbox/koboform_base:latest -f Dockerfile.koboform_base .
- echo 'Building the KPI Docker image.'
- docker build -t kobotoolbox/kpi:latest .
- echo 'Setting up a `kobo-docker` "local" configuration with a minimal `envfile`.'
- KPI_SRC_DIR="$(pwd)"
- cd ..
- git clone https://github.com/kobotoolbox/kobo-docker.git
- cd kobo-docker
- ln -s docker-compose.local.yml docker-compose.yml
- echo -e 'DJANGO_SECRET_KEY=kobo\nKOBO_SUPERUSER_USERNAME=kobo\nKOBO_SUPERUSER_PASSWORD=kobo' > envfile.local.txt
- docker-compose run --rm kpi echo 'Container and dependencies started.' 1>/dev/null
script:
# Use `my_init` to run the normal initialization steps before running the tests.
# NOTE: For some reason the `--rm` flag is needed for Compose to retain the accurate exit status.
- echo 'Running KPI tests from `docker/run_tests.bash`.'
- docker-compose run --rm kpi my_init --skip-runit docker/run_tests.bash