sudo: required
dist: trusty

language: generic

addons:
  apt:
    packages:
    - gir1.2-gtk-3.0
    - python3-gi
    - python3-gi-cairo
    - graphviz
    - xvfb
    - twine

before_install:
- dot -V
- /usr/bin/python3 --version

script:
- cd tests
- LANG=C xvfb-run -a -s '-screen 0 1024x768x24' /usr/bin/python3 ../test.py *.dot graphs/*.gv
- cd ..

# https://docs.travis-ci.com/user/deployment/pypi/
deploy:
  provider: pypi
  user: jrfonseca
  password:
    secure: HAPllYFYXrSl5IPMIoWHCTuk6rxxqoHDZWudtctiVxBGlaBftya08nFi+jfWHZOE3cofoqnkXUV+9qtMG9aLW8wVtZeABy33KQe2MPppn3dNFN/UKKskXBsFpSeFy8xAwwcWou1okrg9kFfZpxwb272e0MHrtMsXjNmpodrUAhM=
  on:
    tags: true
    distributions: sdist
    repo: jrfonseca/xdot.py
  skip_upload_docs: true
