Browse Source

Travis/tox configuration for Elasticsearch 6

Karl Hobley 7 years ago
parent
commit
cac3a65a3d
3 changed files with 16 additions and 1 deletions
  1. 9 0
      .travis.yml
  2. 3 0
      scripts/travis/install_elasticsearch6.sh
  3. 4 1
      tox.ini

+ 9 - 0
.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:

+ 3 - 0
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

+ 4 - 1
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