From ebf0dee2166e3100edfc16388f34da6ead6b7d98 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Sun, 30 May 2021 19:31:42 +0200 Subject: [PATCH] Travis stuff --- .travis.yml | 15 ++++++++------- umap/tests/settings.py | 16 ++++++++++++++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6ae2c056..b3d77fca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,22 @@ -sudo: false +os: linux language: python -dist: xenial +dist: focal python: - "3.6" - "3.7" - "3.8" - "3.9" services: -- postgresql + - postgresql addons: - postgresql: "9.6" apt: packages: - libgdal-dev - - postgresql-9.6-postgis-2.4 + - postgresql-12-postgis-3 env: -- UMAP_SETTINGS=umap/tests/settings.py + global: + - PGPORT=5432 + - UMAP_SETTINGS=umap/tests/settings.py install: - pip install . - pip install -r requirements-dev.txt @@ -23,7 +24,7 @@ script: make test notifications: irc: channels: - - "irc.freenode.net#umap" + - "irc.libera.chat#umap" on_success: change on_failure: always email: false diff --git a/umap/tests/settings.py b/umap/tests/settings.py index 38fb0d6f..286c6860 100644 --- a/umap/tests/settings.py +++ b/umap/tests/settings.py @@ -1,4 +1,16 @@ -from umap.settings.base import * # pylint: disable=W0614,W0401 +import os -SECRET_KEY = 'justfortests' +from umap.settings.base import * # pylint: disable=W0614,W0401 + +SECRET_KEY = "justfortests" COMPRESS_ENABLED = False + +if "TRAVIS" in os.environ: + DATABASES = { + "default": { + "ENGINE": "django.contrib.gis.db.backends.postgis", + "NAME": "umap", + "PORT": 5433, + "USER": "travis", + } + }