language: python
dist: xenial

addons:
    apt:
        packages:
        - gfortran

env:
  global:
    # pyart-docs-bot GH
    secure: "cHUzL+m2ZBGAY0adl6DirWg3zUXvfuVo1meTf5sSMg0XBCoUlhpLuIrFMGgBET88G6OokfzUa8wfZHml4bkjN4N3u9ZjphvAB+zrhC5yL1cecLvo0Z9k+umfq9/Ieo4qe2oofr1TfRbqkgWViio+GSYrrhh/vEbF1zr4weaPGRY="

matrix:
    include:
    - python: 3.6
      env:
        - PYTHON_VERSION="3.6"
        - PYTEST_ARGS="-v --cov pyart"
    - python: 3.7
      env:
        - PYTHON_VERSION="3.7"
        - PYTEST_ARGS="-v --cov pyart"
    - python: 3.8
      env:
        - PYTHON_VERSION="3.8"
        - PYTEST_ARGS="-v --cov pyart"
        - DOC_BUILD="true"
        - COVERALLS="true"
    - python: 3.8
      env:
        - PYTHON_VERSION="3.8"
        - PYTEST_ARGS="-v --pyargs pyart"
        - FROM_RECIPE="true"
install: source continuous_integration/install.sh
script: eval xvfb-run pytest $PYTEST_ARGS
after_success:
    # Ignore coveralls failures as the coveralls server is not very reliable
    # but we don't want travis to report a failure in the github UI just
    # because the coverage report failed to be published.
    - if [[ "$COVERALLS" == "true" ]]; then coveralls || echo "failed"; fi
    # Build docs if requested
    - if [[ "$DOC_BUILD" == "true" ]]; then cd $TRAVIS_BUILD_DIR; source continuous_integration/build_docs.sh; fi
