testing: stage: test image: python:3.6.5-jessie services: - postgres:9.6.8 script: - export ENV=development - export DATABASE_URL=postgres://postgres:@postgres:5432/python-test-app - pip install -r requirements.txt --quiet - ./manage.py check - coverage3 run manage.py test - coverage3 report - coverage3 html artifacts: paths: - htmlcov/ expire_in: 1 month tags: - docker flake8: stage: test image: python:3.6.5-jessie script: - pip install flake8 - flake8 tags: - docker pages: stage: deploy dependencies: - testing script: - mkdir .public - mv htmlcov/ .public/coverage - mv docs/ .public/docs - mv .public public artifacts: paths: - public expire_in: 1 month only: - master tags: - docker preprod: type: deploy image: ruby script: - gem install dpl - dpl --provider=heroku --app=outgoing-preprod --api-key=$HEROKU_API_KEY only: - production tags: - docker