stages: - build - lint - test build base image: image: docker:stable-git stage: build script: - sh scripts/deploy-ci.sh tags: - docker only: - master - django - django+add-gitlab-ci lint: image: registry.gitlab.com/python-discord/projects/site/django-base:latest stage: lint script: - pipenv install --dev --system - flake8 test: image: registry.gitlab.com/python-discord/projects/site/django-base:latest stage: test services: - postgres:10-alpine script: - python manage.py migrate - python manage.py test variables: DATABASE_URL: postgres://django:supersecret@postgres/pysite POSTGRES_DB: pysite POSTGRES_PASSWORD: supersecret POSTGRES_USER: django