language: python
dist: xenial
sudo: false

addons:
  apt:
    packages:
    - libdbus-1-dev
    - libgirepository1.0-dev

before_install:
    - wget https://gitlab.matrix.org/matrix-org/olm/-/archive/master/olm-master.tar.bz2
    - tar -xvf olm-master.tar.bz2
    - pushd olm-master && make && sudo make PREFIX="/usr" install && popd
    - rm -r olm-master

matrix:
    include:
        - python: 3.6
          env: TOXENV=py36
        - python: 3.7
          env: TOXENV=py37
        - python: 3.7
          env: TOXENV=coverage

install: pip install tox-travis PyGObject dbus-python
script: tox

after_success:
    - bash <(curl -s https://codecov.io/bash)
