sudo: false

language: python
python:
    - "2.7"
    - "3.5"
    - "3.6"
    - "3.7"
    - "pypy"

addons:
    sonarcloud:
        organization: "django-haystack"
    apt_packages:
        - default-jdk

dist: xenial

cache:
    apt: true
    pip: true
    directories:
        - $HOME/download-cache
        - $HOME/.cache/pre-commit

env:
    - SOLRCLOUD=false
    - SOLRCLOUD=true

matrix:
    allow_failures:
        - python: "pypy"

install:
    - "pip install 'requests>2' coverage codecov pre-commit"
    - "pip install ."
    - 'if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then travis_retry pip install faulthandler; fi'
    - 'if [[ "${SOLRCLOUD:-false}" == "true" ]]; then pip install -e .[solrcloud]; fi'

script:
    - coverage run run-tests.py
    - git fetch --unshallow
    - git diff --name-only $TRAVIS_COMMIT_RANGE | xargs pre-commit run --files

after_success:
    - git fetch --unshallow --tags
    - codecov
    - coverage xml
    - sonar-scanner -Dsonar.projectVersion="$(python setup.py --version)"

notifications:
    email: false

sudo: false

language: python
python:
    - "3.6"
    - "3.7"
    - "3.8"
    - "3.9"
    - "pypy"

addons:
    sonarcloud:
        organization: "django-haystack"
    apt_packages:
        - default-jdk

dist: xenial

cache:
    apt: true
    pip: true
    directories:
        - $HOME/download-cache
        - $HOME/.cache/pre-commit

env:
    - SOLRCLOUD=false
    - SOLRCLOUD=true

matrix:
    allow_failures:
        - python: "pypy"

install:
    - "pip install 'requests>2' coverage codecov pre-commit"
    - "pip install ."
    - 'if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then travis_retry pip install faulthandler; fi'
    - 'if [[ "${SOLRCLOUD:-false}" == "true" ]]; then pip install -e .[solrcloud]; fi'

script:
    - coverage run run-tests.py
    - git fetch --unshallow
    - git diff --name-only $TRAVIS_COMMIT_RANGE | xargs pre-commit run --files

after_success:
    - git fetch --unshallow --tags
    - codecov
    - coverage xml
    - sonar-scanner -Dsonar.projectVersion="$(python setup.py --version)"

notifications:
    email: false

Update Python versions for CI
Update Python versions for CI
