summaryrefslogtreecommitdiffstats
path: root/.travis.yml
blob: 8d50fbd17420210fc3442d6b29b9e1025fbfbe03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
dist: xenial

sudo: required

language: python

python:
  - "3.6"
  - "3.7"
  - "3.8"
  - "3.9-dev"

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

install:
  - pip install --no-cache-dir .
  - 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"