sudo: false
language: python
python:
  - "3.6"
  - "3.7"
addons:
  postgresql: "9.4"
env:
  matrix:
    - DJANGO_VERSION="==2.0" DB="postgres"
    - DJANGO_VERSION="==2.0" DB="mysql"
    - DJANGO_VERSION="==2.1" DB="postgres"
    - DJANGO_VERSION="==2.1" DB="mysql"
# command to install dependencies
install:
  - pip install Django$DJANGO_VERSION flake8 coverage
  - pip install -e .[all]
# command to run tests
before_script:
  - psql -c 'CREATE DATABASE lazysignup;' -U postgres
  - mysql -e 'CREATE DATABASE lazysignup;'
script:
  - flake8 .
  - coverage run manage.py test --settings=lazysignup.tests.settings
  - coverage report --fail-under=98
  - psql -c 'DROP DATABASE IF EXISTS test_lazysignup;' -U postgres
  - mysql -e 'DROP DATABASE IF EXISTS test_lazysignup;'
  - coverage erase
  - coverage run manage.py test --settings=custom_user_tests.settings
  - coverage report --fail-under=98
branches:
  except:
    - 33-late-logins

sudo: false
language: python
python:
  - "3.5"
  - "3.6"
addons:
  postgresql: "9.4"
env:
  matrix:
    - DJANGO_VERSION="==2.0" DB="postgres"
    - DJANGO_VERSION="==2.0" DB="mysql"
    - DJANGO_VERSION="==2.1" DB="postgres"
    - DJANGO_VERSION="==2.1" DB="mysql"
# command to install dependencies
install:
  - pip install Django$DJANGO_VERSION flake8 coverage
  - pip install -e .[all]
# command to run tests
before_script:
  - psql -c 'CREATE DATABASE lazysignup;' -U postgres
  - mysql -e 'CREATE DATABASE lazysignup;'
script:
  - flake8 .
  - coverage run manage.py test --settings=lazysignup.tests.settings
  - coverage report --fail-under=98
  - psql -c 'DROP DATABASE IF EXISTS test_lazysignup;' -U postgres
  - mysql -e 'DROP DATABASE IF EXISTS test_lazysignup;'
  - coverage erase
  - coverage run manage.py test --settings=custom_user_tests.settings
  - coverage report --fail-under=98
branches:
  except:
    - 33-late-logins

Test with Python 3.5 & 3.6; TravisCI fails with Django 2.1 :(
Test with Python 3.5 & 3.6; TravisCI fails with Django 2.1 :(
