mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-01-24 00:04:13 +03:00
adds simple docker test
This commit is contained in:
parent
5756a61732
commit
82a30ea88c
10
.travis.yml
10
.travis.yml
|
@ -1,6 +1,10 @@
|
||||||
# Config file for automatic testing at travis-ci.org
|
# Config file for automatic testing at travis-ci.org
|
||||||
|
|
||||||
sudo: false
|
sudo: required
|
||||||
|
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
|
|
||||||
language: python
|
language: python
|
||||||
python: 3.5
|
python: 3.5
|
||||||
env:
|
env:
|
||||||
|
@ -8,7 +12,9 @@ env:
|
||||||
- TOX_ENV=py34
|
- TOX_ENV=py34
|
||||||
- TOX_ENV=py35
|
- TOX_ENV=py35
|
||||||
|
|
||||||
script: tox -e $TOX_ENV
|
script:
|
||||||
|
- tox -e $TOX_ENV
|
||||||
|
- sh tests/test_docker.sh
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install tox
|
- pip install tox
|
||||||
|
|
18
tests/test_docker.sh
Normal file
18
tests/test_docker.sh
Normal 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
|
Loading…
Reference in New Issue
Block a user