mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-14 13:47:07 +03:00
34 lines
561 B
YAML
34 lines
561 B
YAML
|
stages:
|
||
|
- lint
|
||
|
- test
|
||
|
|
||
|
variables:
|
||
|
POSTGRES_USER: '{{ cookiecutter.project_slug }}'
|
||
|
POSTGRES_PASSWORD: ''
|
||
|
POSTGRES_DB: 'test_{{ cookiecutter.project_slug }}'
|
||
|
|
||
|
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
|
||
|
|