cookiecutter-django/{{cookiecutter.project_slug}}/.gitlab-ci.yml
Gabriel Mejia 2e1a922577
Add CELERY_BROKER_URL for gitlab #2504 (#2505)
* Solved issue #2504

* Added new contributor

Co-authored-by: Gabriel Mejia <gmejia@veritran.com>
2020-03-23 21:43:59 +00:00

38 lines
698 B
YAML

stages:
- lint
- test
variables:
POSTGRES_USER: '{{ cookiecutter.project_slug }}'
POSTGRES_PASSWORD: ''
POSTGRES_DB: 'test_{{ cookiecutter.project_slug }}'
POSTGRES_HOST_AUTH_METHOD: trust
{% if cookiecutter.use_celery == 'y' -%}
CELERY_BROKER_URL: 'redis://redis:6379/0'
{%- endif %}
flake8:
stage: lint
image: python:3.7-alpine
before_script:
- pip install -q flake8
script:
- flake8
pytest:
stage: test
image: python:3.7
tags:
- docker
services:
- postgres:11
variables:
DATABASE_URL: pgsql://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB
before_script:
- pip install -r requirements/local.txt
script:
- pytest