language: python
env:
  - TASK_VERSION=v2.4.0
  - TASK_VERSION=v2.4.1
  - TASK_VERSION=v2.4.2
  - TASK_VERSION=v2.4.3
  - TASK_VERSION=v2.4.4
  - TASK_VERSION=v2.5.0
  - TASK_VERSION=v2.5.1
  - TASK_VERSION=v2.5.2
  - TASK_VERSION=v2.5.3
python:
  - "3.5"
  - "3.6"
  - "3.7"
  - "3.8"
  - "3.9"
install:
  - pip install -e .
  - pip install coveralls
  - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  - sudo apt-get update -qq
  - sudo apt-get install -qq build-essential cmake uuid-dev libgnutls-dev g++-4.8
  - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
  - git clone --recursive https://github.com/GothenburgBitFactory/taskwarrior
  - cd taskwarrior
  - git checkout $TASK_VERSION
  - git clean -dfx
  - git submodule init
  - git submodule update
  - cmake -DCMAKE_BUILD_TYPE=release .
  - make -j2
  - sudo make install
  - task --version
before_script:
  - cd $TRAVIS_BUILD_DIR
script:
  - coverage run --source=tasklib setup.py test
after_success:
  - coveralls
