diff --git a/.travis.yml b/.travis.yml index 37604b3deb..aa087093be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,6 +49,12 @@ matrix: - env: TOXENV=py36-dj20-postgres-elasticsearch5 INSTALL_ELASTICSEARCH5=yes python: 3.6 sudo: true + - env: TOXENV=py36-dj111-postgres-elasticsearch6 INSTALL_ELASTICSEARCH6=yes + python: 3.6 + sudo: true + - env: TOXENV=py36-dj20-postgres-elasticsearch6 INSTALL_ELASTICSEARCH6=yes + python: 3.6 + sudo: true allow_failures: # Ignore failures on Elasticsearch tests because ES on Travis is intermittently flaky - env: TOXENV=py35-dj111-postgres-elasticsearch2 INSTALL_ELASTICSEARCH2=yes @@ -56,6 +62,8 @@ matrix: - env: TOXENV=py36-dj20-sqlite-elasticsearch2 INSTALL_ELASTICSEARCH2=yes - env: TOXENV=py36-dj111-postgres-elasticsearch5 INSTALL_ELASTICSEARCH5=yes - env: TOXENV=py36-dj20-postgres-elasticsearch5 INSTALL_ELASTICSEARCH5=yes + - env: TOXENV=py36-dj111-postgres-elasticsearch6 INSTALL_ELASTICSEARCH6=yes + - env: TOXENV=py36-dj20-postgres-elasticsearch6 INSTALL_ELASTICSEARCH6=yes # Services services: @@ -66,6 +74,7 @@ install: - pip install tox codecov - 'if [[ -n "$INSTALL_ELASTICSEARCH2" ]]; then ./scripts/travis/install_elasticsearch2.sh; fi' - 'if [[ -n "$INSTALL_ELASTICSEARCH5" ]]; then ./scripts/travis/install_elasticsearch5.sh; fi' + - 'if [[ -n "$INSTALL_ELASTICSEARCH6" ]]; then ./scripts/travis/install_elasticsearch6.sh; fi' # Pre-test configuration before_script: diff --git a/scripts/travis/install_elasticsearch6.sh b/scripts/travis/install_elasticsearch6.sh new file mode 100755 index 0000000000..922e6cc775 --- /dev/null +++ b/scripts/travis/install_elasticsearch6.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.1.0.deb && sudo dpkg -i --force-confnew elasticsearch-6.1.0.deb && sudo service elasticsearch restart diff --git a/tox.ini b/tox.ini index b28e8d8d2f..8131d5dd8b 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ skipsdist = True usedevelop = True -envlist = py{34,35,36}-dj{111,20}-{sqlite,postgres,mysql,mssql}-{elasticsearch5,elasticsearch2,noelasticsearch}, +envlist = py{34,35,36}-dj{111,20}-{sqlite,postgres,mysql,mssql}-{elasticsearch6,elasticsearch5,elasticsearch2,noelasticsearch}, [flake8] # D100: Missing docstring in public module @@ -28,6 +28,7 @@ install_command = pip install -e ".[testing]" -U {opts} {packages} commands = elasticsearch2: coverage run runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch2 elasticsearch5: coverage run runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch5 + elasticsearch6: coverage run runtests.py wagtail.search wagtail.documents wagtail.images --elasticsearch6 noelasticsearch: coverage run runtests.py basepython = @@ -47,6 +48,8 @@ deps = elasticsearch2: elasticsearch>=2,<3 elasticsearch5: elasticsearch>=5,<6 elasticsearch5: certifi + elasticsearch6: elasticsearch>=6,<7 + elasticsearch6: certifi setenv = postgres: DATABASE_ENGINE=django.db.backends.postgresql