---
dist: trusty
sudo: required
language: python
python:
    - "2.7"
    - "3.5"
    - "3.6"
    - "3.7-dev"
install:
    - pip install pipenv
    - if [[ "$TRAVIS_PYTHON_VERSION" != "2.7" ]]; then pipenv install --dev; fi
    - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then pipenv install --dev --two; fi
before_script:
    - rm -f monitor.db monitor2.db
    - sqlite3 monitor.db < monitor.sql
    - sqlite3 monitor2.db < monitor.sql
script:
    - if [[ "$TRAVIS_PYTHON_VERSION" != "2.7" ]]; then - pipenv run flake8 --ignore=E501 *.py Alerters/ Monitors/ Loggers/; fi
    - pipenv run env PATH=$PWD/tests/mocks:$PATH coverage run monitor.py -1 -v -d -f tests/monitor.ini
    - pipenv run TEST_VALUE=myenv coverage run --append monitor.py -t -f tests/monitor-env.ini
    - pipenv run coverage run --append -m unittest discover -s tests
    - pipenv run tests/test-network.sh
after_success:
    - pipenv run codecov
matrix:
  allow_failures:
    - python: "3.6"
    - python: "3.7-dev"

---
dist: trusty
sudo: required
language: python
python:
    - "2.7"
    - "3.5"
    - "3.6"
    - "3.7-dev"
install:
    - pip install pipenv
    - if [[ "$TRAVIS_PYTHON_VERSION" != "2.7" ]]; then pipenv install --dev; fi
    - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then pipenv install --dev --two; fi
before_script:
    - rm -f monitor.db monitor2.db
    - sqlite3 monitor.db < monitor.sql
    - sqlite3 monitor2.db < monitor.sql
script:
    - if [[ "$TRAVIS_PYTHON_VERSION" != "2.7" ]]; then pipenv run flake8 --ignore=E501 *.py Alerters/ Monitors/ Loggers/; fi
    - pipenv run env PATH=$PWD/tests/mocks:$PATH coverage run monitor.py -1 -v -d -f tests/monitor.ini
    - pipenv run env TEST_VALUE=myenv coverage run --append monitor.py -t -f tests/monitor-env.ini
    - pipenv run coverage run --append -m unittest discover -s tests
    - pipenv run tests/test-network.sh
after_success:
    - pipenv run codecov
matrix:
  allow_failures:
    - python: "3.6"
    - python: "3.7-dev"

Add use of env to pipenv shell
Add use of env to pipenv shell
