dist: bionic
language: python
cache: pip
python:
    - 3.7
services:
    - postgresql
    - docker
addons:
    postgresql: "11"
    apt:
        packages:
            - postgresql-11-postgis-2.5
branches:
    only:
        - master
env:
    global:
        - SECRET_KEY="SecretKeyForTravis"
        - DATABASE_URL="postgis://postgres@localhost:5432/travis_ci_test"
before_install:
    - docker build -t dbcawa/oim-cms .
    - pip install poetry
install:
    - poetry install --verbose --no-interaction --no-ansi
before_script:
    - psql -U postgres -c "create database travis_ci_test;"
    - psql -U postgres -d travis_ci_test -c "create extension postgis;"
    - python manage.py migrate --noinput
script:
    - python manage.py test

dist: bionic
language: python
cache: pip
python:
    - "3.8"
services:
    - postgresql
    - docker
addons:
    postgresql: "11"
    apt:
        packages:
            - postgresql-11-postgis-2.5
branches:
    only:
        - master
env:
    global:
        - SECRET_KEY="SecretKeyForTravis"
        - DATABASE_URL="postgis://postgres@localhost:5432/travis_ci_test"
before_install:
    - docker build -t dbcawa/oim-cms .
    - pip install poetry
install:
    - poetry install --verbose --no-interaction --no-ansi
before_script:
    - psql -U postgres -c "create database travis_ci_test;"
    - psql -U postgres -d travis_ci_test -c "create extension postgis;"
    - python manage.py migrate --noinput
script:
    - python manage.py test

Update Python to 3.8 in Travis config.
Update Python to 3.8 in Travis config.
