language: python
sudo: false
jdk: openjdk8
dist: bionic
addons:
  - postgresql: 11
services: postgresql
env:
  global:
    - TESTMODEL_URL=http://localhost:8080/intermine-demo
    - TESTMODEL_PATH=intermine-demo
before_script:
  - export JAVA_HOME=/usr/local/lib/jvm/openjdk8
  - java -version
  - javac -version
  - echo $JAVA_HOME
  - jdk_switcher use openjdk8
  - "./config/travis/init-solr.sh"
  - "./config/travis/init.sh"
script:
  - python setup.py test
  - python setup.py livetest
python:
  - "3.7"
  - "3.8"

language: python
sudo: true
jdk: openjdk8
dist: bionic
addons:
  - postgresql: 11
services: postgresql
env:
  global:
    - TESTMODEL_URL=http://localhost:8080/intermine-demo
    - TESTMODEL_PATH=intermine-demo
before_script:
  - sudo apt update
  - sudo apt install openjdk-8-jre openjdk-8-jdk-headless openjdk-8-jdk openjdk-8-jre
  - update-java-alternatives -l
  - sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
  - java -version
  - javac -version
  - echo $JAVA_HOME
  - jdk_switcher use openjdk8
  - "./config/travis/init-solr.sh"
  - "./config/travis/init.sh"
script:
  - python setup.py test
  - python setup.py livetest
python:
  - "3.7"
  - "3.8"

Install and configure OpenJDK 8
Install and configure OpenJDK 8
