language: python

branches:
  only:
    - master

python:
  - "3.6"
  - "3.7"
  - "3.8"
    # - "3.9"  # not yet, due to Galaxy

cache: pip

addons:
  apt:
    update: true

before_install:
  - sudo apt -y install libhdf5-dev

install:
  - pip install git+https://github.com/WorkflowConversion/CTDopts
  - pip install lxml ruamel.yaml planemo
  - pip install flake8 flake8-import-order
  - cd $TRAVIS_BUILD_DIR
  - make install install-dep
script:
  - flake8
  - make diff_pydocstyle_report
  - make test
  - planemo l tests/test-data/

  # planemo test content of tests/test-data (this is OK, because the previous
  # tests ensure equality of the xmls that are generated and those in the package)
  - export PATH=$(pwd)/tests/test-data:$PATH && planemo t tests/test-data/

# after_script:
# - python -m codecov
