image: python:3.5 services: - postgres:latest variables: POSTGRES_DB: ci POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres stages: - test - lint - deploy test: stage: test variables: DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB" script: - python -V - pip install -r requirements.txt - cp sikweb/settings-sample.py sikweb/default_settings.py - cp sikweb/.ci-settings.py sikweb/settings.py - python manage.py migrate --noinput - python manage.py createdefaultadmin - python manage.py test pep8: stage: lint script: - pip install pep8 - pep8 --config=setup.cfg --count . eslint: image: node:7.10.0 stage: lint script: - npm install -g eslint - eslint . deploy: stage: deploy environment: name: dev url: http://web.sik.party only: - develop script: - python -V - pip install -r requirements.txt - cp sikweb/settings-sample.py sikweb/default_settings.py - cp sikweb/.ci-settings.py sikweb/settings.py - python manage.py migrate --noinput - python manage.py createdefaultadmin