diff --git a/.travis.yml b/.travis.yml index 4608b31c..701bc097 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,10 @@ # Config file for automatic testing at travis-ci.org -sudo: false +sudo: required + +services: + - docker + language: python python: 3.5 env: @@ -8,7 +12,9 @@ env: - TOX_ENV=py34 - TOX_ENV=py35 -script: tox -e $TOX_ENV +script: + - tox -e $TOX_ENV + - sh tests/test_docker.sh install: - pip install tox diff --git a/tests/test_docker.sh b/tests/test_docker.sh new file mode 100644 index 00000000..30a27dad --- /dev/null +++ b/tests/test_docker.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# this is a very simple script that tests the docker configuration for cookiecutter-django +# it is meant to be run from the root directory of the repository, eg: +# sh tests/test_docker.sh + +# install test requirements +pip install -r requirements.txt + +# create a cache directory +mkdir -p .cache/docker +cd .cache/docker + +# create the project using the default settings in cookiecutter.json +cookiecutter ../../ --no-input --overwrite-if-exists +cd project_name + +# run the project's tests +docker-compose -f dev.yml run django python manage.py test