Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1005 B
Newer Older
  - style
  - test

image: python:2

services:
  - mysql:5.7

variables:
  MYSQL_DATABASE: internewshid
  MYSQL_ROOT_PASSWORD: passw0rd
  DJANGO_SECRET_KEY: 'nde2wr2r)#a*%n$!(zl8#3v_o!sp=hd9vbv%*e6atgr0dp=b(7'

before_script:
  - pip install -U pipenv setuptools pip
  - ln -srf internewshid/local_settings.py.gitlab internewshid/local_settings.py
  - |
    echo "SECRET_KEY = '$DJANGO_SECRET_KEY'" >> internewshid/private_settings.py
    echo "DB_PASSWORD = '$MYSQL_ROOT_PASSWORD'" >> internewshid/private_settings.py
  - pipenv install --dev --two --deploy
  stage: checks
    - pipenv run python manage.py check
    - pipenv run python manage.py makemigrations --check
style:
  stage: style
Luke Murphy's avatar
Luke Murphy committed
  allow_failure: true
    - pipenv run pylava internewshid
      pipenv run isort internewshid \
      --recursive \
      --check-only \
      --diff \
      --settings-path=setup.cfg

  stage: test
  script:
    - pipenv run pytest -v --cov