adds simple docker test

This commit is contained in:
Jay 2016-01-18 11:56:48 +01:00
parent 5756a61732
commit 82a30ea88c
2 changed files with 26 additions and 2 deletions

View File

@ -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

18
tests/test_docker.sh Normal file
View File

@ -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