stages: - lint - test - build - deploy py27-django18: image: python:2.7 stage: test before_script: - pip install tox script: tox -e py27-django18 py34-django18: image: python:3.4 stage: test before_script: - pip install tox script: tox -e py34-django18 py35-django18: image: python:3.5 stage: test before_script: - pip install tox script: tox -e py35-django18 py36-django18: image: python:3.6 stage: test before_script: - pip install tox script: tox -e py36-django18 py37-django18: image: python:3.7-rc-stretch stage: test before_script: - pip install tox script: tox -e py37-dev-django18 py27-django19: image: python:2.7 stage: test before_script: - pip install tox script: tox -e py27-django19 py34-django19: image: python:3.4 stage: test before_script: - pip install tox script: tox -e py34-django19 py35-django19: image: python:3.5 stage: test before_script: - pip install tox script: tox -e py35-django19 py36-django19: image: python:3.6 stage: test before_script: - pip install tox script: tox -e py36-django19 py37-django19: image: python:3.7-rc-stretch stage: test before_script: - pip install tox script: tox -e py37-dev-django19 py27-django110: image: python:2.7 stage: test before_script: - pip install tox script: tox -e py27-django110 py34-django110: image: python:3.4 stage: test before_script: - pip install tox script: tox -e py34-django110 py35-django110: image: python:3.5 stage: test before_script: - pip install tox script: tox -e py35-django110 py36-django110: image: python:3.6 stage: test before_script: - pip install tox script: tox -e py36-django110 py37-django110: image: python:3.7-rc-stretch stage: test before_script: - pip install tox script: tox -e py37-dev-django110 py27-django111: image: python:2.7 stage: test before_script: - pip install tox script: tox -e py27-django111 py34-django111: image: python:3.4 stage: test before_script: - pip install tox script: tox -e py34-django111 py35-django111: image: python:3.5 stage: test before_script: - pip install tox script: tox -e py35-django111 py36-django111: image: python:3.6 stage: test before_script: - pip install tox script: tox -e py36-django111 py37-django111: image: python:3.7-rc-stretch stage: test before_script: - pip install tox script: tox -e py37-dev-django111 safety: stage: lint before_script: - pip install tox script: tox -e safety allow_failure: true style: stage: lint before_script: - pip install tox script: tox -e style allow_failure: true docs: stage: lint before_script: - pip install tox script: tox -e docs allow_failure: true build: image: docker:latest services: - docker:dind stage: build script: echo "Build Docker images" deploy_staging: stage: deploy script: - echo "Deploy to staging server" environment: name: staging url: https://staging.example.com only: - master deploy_prod: stage: deploy script: - echo "Deploy to production server" environment: name: production url: https://example.com when: manual only: - master