Skip to content

Commit

Permalink
Update test matrix removing Python 3.4 and adding 3.6, 3.7, 3.8
Browse files Browse the repository at this point in the history
Python 3.4 is now EOL.

Update to Xenial required for Python 3.7 and 3.8 on Travis.

Update flake8 to use Python 3.8 compatible pyflakes [1]. Allow the
latest matching pycodestyle to be automatically installed.

Use libsqlite3-mod-spatialite to save compile time.

[1] PyCQA/pyflakes#367
  • Loading branch information
cjmayo committed Mar 14, 2020
1 parent 5bd9a91 commit 34bce8a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 45 deletions.
32 changes: 16 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
language: python

sudo: true
dist: trusty
dist: xenial

addons:
postgresql: 9.3
postgresql: 9.6
apt:
packages:
- postgresql-9.3-postgis-2.3
- postgresql-9.6-postgis-2.4
- python2.7-dev
- python3-dev
- autotools-dev
Expand All @@ -17,6 +17,7 @@ addons:
- libproj-dev
- libreadline-dev
- libsqlite3-dev
- libsqlite3-mod-spatialite
- libxml2-dev
- zlib1g-dev

Expand All @@ -27,33 +28,32 @@ notifications:
services:
- postgresql

cache:
directories:
- libspatialite-4.3.0a

matrix:
include:
- python: 2.7
env:
- TOX_ENV=py27sqla11
- python: 3.4
env:
- TOX_ENV=py34sqla11
- python: 3.5
env:
- TOX_ENV=py35sqla11
- python: pypy
- python: 3.6
env:
- TOX_ENV=py36sqla11
- python: 3.7
env:
- TOX_ENV=py37sqla11
- python: 3.8
env:
- TOX_ENV=py38sqla11
- python: pypy3
env:
- TOX_ENV=pypysqla11

env:
global:
- SPATIALITE_LIBRARY_PATH="/usr/local/lib/mod_spatialite.so"
- SPATIALITE_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu/mod_spatialite.so"

install:
# Install Spatialite
- ./install-spatialite.sh

# Install tox
- pip install tox

Expand Down Expand Up @@ -81,7 +81,7 @@ before_script:

script:
# Run the library through flake8
- flake8 geoalchemy2 tests --ignore=E711 --ignore=W503
- flake8 geoalchemy2 tests --ignore=W503 --ignore=W504

# Run the unit test suite
- tox -e $TOX_ENV --sitepackages -- -v --cov geoalchemy2 --cov-report term-missing
Expand Down
20 changes: 0 additions & 20 deletions install-spatialite.sh

This file was deleted.

3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
-e .

# Additional requirements for running the testsuite and development
pycodestyle==2.2.0
flake8==3.2.0
flake8==3.7.9
pytest==3.7.4
pytest-cov==2.5.1

Expand Down
28 changes: 21 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py27sqla11, py34sqla11, py35sqla11, pypysqla11
envlist=py27sqla11, py35sqla11, py36sqla11, py37sqla11, py38sqla11, pypysqla11

[testenv]
passenv=SPATIALITE_LIBRARY_PATH
Expand All @@ -15,23 +15,37 @@ deps=
pysqlite
-rrequirements.txt

[testenv:py34sqla11]
basepython=python3.4
[testenv:py35sqla11]
basepython=python3.5
deps=
SQLAlchemy==1.1.2
psycopg2
-rrequirements.txt

[testenv:py35sqla11]
basepython=python3.5
[testenv:py36sqla11]
basepython=python3.6
deps=
SQLAlchemy==1.1.2
psycopg2
-rrequirements.txt

[testenv:pypysqla11]
basepython=pypy
[testenv:py37sqla11]
basepython=python3.7
deps=
SQLAlchemy==1.1.2
psycopg2
-rrequirements.txt

[testenv:py38sqla11]
basepython=python3.8
deps=
SQLAlchemy==1.1.2
psycopg2
-rrequirements.txt

[testenv:pypysqla11]
basepython=pypy3
deps=
SQLAlchemy==1.3.15
psycopg2cffi
-rrequirements.txt

0 comments on commit 34bce8a

Please sign in to comment.