Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions {{cookiecutter.repo_name}}/.gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python
image: python:3

# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service
# services:
# - postgres:latest

# variables:
# POSTGRES_DB: pgdb

# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- ~/.cache/pip/

before_script:
- pip -V # Print version for debugging
- pip install -r requirements/development.txt # Install dependencies
- pip freeze # Print installed packages for debugging

# stages is used to define stages that can be used by jobs.
# The specification of stages allows for having flexible multi stage pipelines.
# The ordering of elements in stages defines the ordering of jobs' execution:
# 1. Jobs of the same stage are run in parallel.
# 2. Jobs of the next stage are run after the jobs from the previous stage
# complete successfully.
stages:
- test
- deploy

# Django unit tests
django_tests:
stage: test
script:
- python project/manage.py test
when: on_success

# Eventually deploy if test stage passed and branch is `staging`
deploy_stage:
stage: deploy
# Dummy script, allowed to fail
script:
- echo "\nDeploy not defined!; exit 1"
allow_failure: true
# Execute job only when all jobs from prior stages succeed.
when: on_success
only:
- staging

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
RESOURCE_DIR = 'resources'
RESOURCES_PATH = join(REPO_PATH, RESOURCE_DIR)

# Add our project to our pythonpath, this way we don't need to type our project
# Add our project to our python path, this way we don't need to type our project
# name in our dotted import paths:
path.append(PROJECT_PATH)

Expand Down
21 changes: 9 additions & 12 deletions {{cookiecutter.repo_name}}/requirements/common.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# This is an implicit value, here for clarity
--index-url https://pypi.python.org/simple/

# Bleeding edge Django (py 2.7, 3.5, 3.6)
Django<1.12
# Django 1.11 (LTS)
Django>=1.11,<1.12
django-extensions<1.9

# Configuration
django-environ<0.5
# Django-environ allows you to utilize 12factor inspired environment variables
# to configure your Django application.
django-environ==0.4.2

# Forms
django-braces<1.12

# Models
django-model-utils<4.0

# Databases
# psycopg2
# Mixins to add easy functionality to class-based views, forms, and models.
django-braces>=1.11,<1.12

# Model mixins and utilities
django-model-utils==3.0.0
5 changes: 0 additions & 5 deletions {{cookiecutter.repo_name}}/requirements/development.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Local development dependencies go here
-r common.txt
selenium
coverage
Sphinx
ipython
# Jupyter notebook server
jupyter

# django-debug-toolbar that works with Django 1.5+
Expand Down