image: python:3.6.5-jessie services: - postgres:9.6.8 testing: stage: test script: - export ENV=development - export DATABASE_URL=postgres://postgres:@postgres:5432/python-test-app - pip install -r requirements.txt - ./manage.py check - coverage3 run manage.py test - coverage3 report - coverage3 html artifacts: paths: - htmlcov/ expire_in: 1 month tags: - docker flake8: stage: test script: - pip install flake8 - flake8 tags: - docker pages: stage: deploy dependencies: - testing script: - mv htmlcov/ public/ artifacts: paths: - public expire_in: 1 month only: - master tags: - docker