dist: xenial

sudo: required

language: python

python:
  - "3.6"
  - "3.7"
  - "3.8"

before_install:
  - which python
  - which pip
  - pip install -U setuptools

install:
  - pip install .
  - pip install -r requirements-dev.txt
  - pip install keyrings.alt>=3.1

script:
  - set -e
  - coverage run --source pgcli -m py.test
  # TODO: fix failing tests and uncomment.
  # commented out on 9/8/2020 by j-bennet
  # - cd tests
  # - behave --no-capture
  # - cd ..
  # check for changelog ReST compliance
  - rst2html.py --halt=warning changelog.rst >/dev/null
  # check for black code compliance, 3.6 only
  - if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then pip install black && black --check . ; else echo "Skipping black for $TRAVIS_PYTHON_VERSION"; fi
  - set +e

after_success:
  - coverage combine
  - codecov

notifications:
  webhooks:
    urls:
      - YOUR_WEBHOOK_URL
    on_success: change  # options: [always|never|change] default: always
    on_failure: always  # options: [always|never|change] default: always
    on_start: false     # default: false

services:
  - postgresql

addons:
  postgresql: "9.6"

dist: xenial

sudo: required

language: python

python:
  - "3.6"
  - "3.7"
  - "3.8"

before_install:
  - which python
  - which pip
  - pip install -U setuptools

install:
  - pip install .
  - pip install -r requirements-dev.txt
  - pip install keyrings.alt>=3.1

script:
  - set -e
  - coverage run --source pgcli -m py.test
  - cd tests
  - behave --no-capture
  - cd ..
  # check for changelog ReST compliance
  - rst2html.py --halt=warning changelog.rst >/dev/null
  # check for black code compliance, 3.6 only
  - if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then pip install black && black --check . ; else echo "Skipping black for $TRAVIS_PYTHON_VERSION"; fi
  - set +e

after_success:
  - coverage combine
  - codecov

notifications:
  webhooks:
    urls:
      - YOUR_WEBHOOK_URL
    on_success: change  # options: [always|never|change] default: always
    on_failure: always  # options: [always|never|change] default: always
    on_start: false     # default: false

services:
  - postgresql

addons:
  postgresql: "9.6"

Revert "Temporarily comment out behave tests."
Revert "Temporarily comment out behave tests."

This reverts commit 59ae65cbbf698d1608e7fd3d55b507f3599ac117.
