sudo: false
env:
- DJANGO_DEBUG=True DJANGO_SETTINGS_MODULE=memopol.settings
language: python
python:
- '2.7'
before_install:
- pip install codecov
install:
- pip install -e .[testing]
before_script:
- bin/install_client_deps.sh
script:
- bash -c '! lesscpy -N static/less/base.less 2>&1 | grep Error'
- flake8 . --exclude '*/migrations,docs,static' --ignore E128
- py.test memopol representatives_positions representatives_recommendations
- rm -rf db.sqlite
- django-admin migrate
- django-admin update_score
after_success:
- codecov
deploy:
- provider: openshift
  user: memopol@laquadrature.net
  password:
    secure: atDq1NEkHXOsV2gZKeXAIn+PvbL3jduz3WK1qIs7BSHyNbrZMT1OUmvoXXrM8+i5eqW3TNsvp23w0RuD06wxSjHkPl+ZCEXP1Ao98p85UZNCgixxiwZHEhL6Amz5vqueGhv+47VOIKNgNFb9NAtRrWyIdA9xDUiK2oWkMSDmHas=
  app: master
  domain: memopol
  deployment_branch: master
  on:
    repo: political-memory/political_memory
    branch: master
- provider: openshift
  user: memopol@laquadrature.net
  password:
    secure: atDq1NEkHXOsV2gZKeXAIn+PvbL3jduz3WK1qIs7BSHyNbrZMT1OUmvoXXrM8+i5eqW3TNsvp23w0RuD06wxSjHkPl+ZCEXP1Ao98p85UZNCgixxiwZHEhL6Amz5vqueGhv+47VOIKNgNFb9NAtRrWyIdA9xDUiK2oWkMSDmHas=
  app: v3
  domain: memopol
  deployment_branch: v3
  on:
    repo: political-memory/political_memory
    branch: v3
