sudo: false
cache: pip

language: python

python:
    - 3.6

services:
  - postgresql

matrix:
  include:
    - env: TOXENV=py DB=postgres OCSPDASH_TEST_CONNECTOR=psycopg2 OCSPDASH_TEST_CONNECTION=postgresql+psycopg2://travis@localhost/tests
    - env: TOXENV=py DB=sqlite
    - env: TOXENV=docs
    - env: TOXENV=manifest
    - env: TOXENV=rst-lint
    - env: TOXENV=flake8
    - env: TOXENV=doc8
    - env: TOXENV=mypy
    - env: TOXENV=vulture
  allow_failures:
    - env: TOXENV=mypy
    - env: TOXENV=vulture

install:
    - pip install tox codecov coverage

before_script:
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS tests;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS tests_tmp;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE tests;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE tests_tmp;' -U postgres; fi"

script:
    - tox

after_success:
    - tox -e coverage-report
    - codecov

sudo: false
cache: pip

language: python

python:
    - 3.6

services:
  - postgresql

matrix:
  include:
    - env: TOXENV=py DB=postgres OCSPDASH_TEST_CONNECTOR=psycopg2 OCSPDASH_TEST_CONNECTION=postgresql+psycopg2://travis@localhost/tests
    - env: TOXENV=py DB=sqlite
    - env: TOXENV=docs
    - env: TOXENV=manifest
    - env: TOXENV=rst-lint
    - env: TOXENV=flake8
    - env: TOXENV=doc8
    - env: TOXENV=mypy
    - env: TOXENV=vulture
  allow_failures:
    - env: TOXENV=vulture

install:
    - pip install tox codecov coverage

before_script:
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS tests;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'DROP DATABASE IF EXISTS tests_tmp;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE tests;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE tests_tmp;' -U postgres; fi"

script:
    - tox

after_success:
    - tox -e coverage-report
    - codecov

Remove allow_failure for mypy in Travis.
Remove allow_failure for mypy in Travis.

Now that mypy passes, never let it fail again!
