Skip to content

Commit

Permalink
Trying to fix travis on pg 9.3 (#18)
Browse files Browse the repository at this point in the history
1) Fixed django 3.0 compatibility
2) Replaced PostgreSQL 9.3 testing with PostgreSQL 12
3) Replaced python 3.4 testing with python 3.8
4) Added django 2.2 and 3.0 testing
  • Loading branch information
M1ha-Shvn authored Dec 15, 2019
1 parent 2b48f28 commit 4b26894
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 75 deletions.
188 changes: 125 additions & 63 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,77 +5,81 @@ cache: pip
services:
- postgresql
addons:
postgresql: "11"
postgresql: "12"
apt:
packages:
- postgresql-10
- postgresql-client-10
- postgresql-11
- postgresql-client-11
- systemd-sysv

- postgresql-12
- postgresql-client-12
python:
- 2.7
- 3.4
- 3.5
- 3.6
- 3.7
- 3.8

env:
- DJANGO=1.7 PG=9.3
- DJANGO=1.7 PG=9.4
- DJANGO=1.7 PG=9.5
- DJANGO=1.7 PG=9.6
- DJANGO=1.7 PG=10
- DJANGO=1.7 PG=11
- DJANGO=1.8 PG=9.3
- DJANGO=1.7 PG=12
- DJANGO=1.8 PG=9.4
- DJANGO=1.8 PG=9.5
- DJANGO=1.8 PG=9.6
- DJANGO=1.8 PG=10
- DJANGO=1.8 PG=11
- DJANGO=1.9 PG=9.3
- DJANGO=1.8 PG=12
- DJANGO=1.9 PG=9.4
- DJANGO=1.9 PG=9.5
- DJANGO=1.9 PG=9.6
- DJANGO=1.9 PG=10
- DJANGO=1.9 PG=11
- DJANGO=1.10 PG=9.3
- DJANGO=1.9 PG=12
- DJANGO=1.10 PG=9.4
- DJANGO=1.10 PG=9.5
- DJANGO=1.10 PG=9.6
- DJANGO=1.10 PG=10
- DJANGO=1.10 PG=11
- DJANGO=1.11 PG=9.3
- DJANGO=1.10 PG=12
- DJANGO=1.11 PG=9.4
- DJANGO=1.11 PG=9.5
- DJANGO=1.11 PG=9.6
- DJANGO=1.11 PG=10
- DJANGO=1.11 PG=11
- DJANGO=2.0 PG=9.3
- DJANGO=1.11 PG=12
- DJANGO=2.0 PG=9.4
- DJANGO=2.0 PG=9.5
- DJANGO=2.0 PG=9.6
- DJANGO=2.0 PG=10
- DJANGO=2.0 PG=11
- DJANGO=2.1 PG=9.3
- DJANGO=2.0 PG=12
- DJANGO=2.1 PG=9.4
- DJANGO=2.1 PG=9.5
- DJANGO=2.1 PG=9.6
- DJANGO=2.1 PG=10
- DJANGO=2.1 PG=11
- DJANGO=2.2 PG=9.3
- DJANGO=2.1 PG=12
- DJANGO=2.2 PG=9.4
- DJANGO=2.2 PG=9.5
- DJANGO=2.2 PG=9.6
- DJANGO=2.2 PG=10
- DJANGO=2.2 PG=11
- DJANGO=2.2 PG=12
- DJANGO=3.0 PG=9.4
- DJANGO=3.0 PG=9.5
- DJANGO=3.0 PG=9.6
- DJANGO=3.0 PG=10
- DJANGO=3.0 PG=11
- DJANGO=3.0 PG=12

matrix:
exclude:
# Django 2.0+ doesn't support python 2.7
- python: 2.7
env: DJANGO=2.0 PG=9.3
- python: 2.7
env: DJANGO=2.0 PG=9.4
- python: 2.7
Expand All @@ -87,7 +91,7 @@ matrix:
- python: 2.7
env: DJANGO=2.0 PG=11
- python: 2.7
env: DJANGO=2.1 PG=9.3
env: DJANGO=2.0 PG=12
- python: 2.7
env: DJANGO=2.1 PG=9.4
- python: 2.7
Expand All @@ -99,7 +103,7 @@ matrix:
- python: 2.7
env: DJANGO=2.1 PG=11
- python: 2.7
env: DJANGO=2.2 PG=9.3
env: DJANGO=2.1 PG=12
- python: 2.7
env: DJANGO=2.2 PG=9.4
- python: 2.7
Expand All @@ -110,36 +114,44 @@ matrix:
env: DJANGO=2.2 PG=10
- python: 2.7
env: DJANGO=2.2 PG=11
- python: 2.7
env: DJANGO=2.2 PG=12
- python: 2.7
env: DJANGO=3.0 PG=9.4
- python: 2.7
env: DJANGO=3.0 PG=9.5
- python: 2.7
env: DJANGO=3.0 PG=9.6
- python: 2.7
env: DJANGO=3.0 PG=10
- python: 2.7
env: DJANGO=3.0 PG=11
- python: 2.7
env: DJANGO=3.0 PG=12

# Django 2.1+ doesn't support python 3.4
- python: 3.4
env: DJANGO=2.1 PG=9.3
- python: 3.4
env: DJANGO=2.1 PG=9.4
- python: 3.4
env: DJANGO=2.1 PG=9.5
- python: 3.4
env: DJANGO=2.1 PG=9.6
- python: 3.4
env: DJANGO=2.1 PG=10
- python: 3.4
env: DJANGO=2.1 PG=11
- python: 3.4
env: DJANGO=2.2 PG=9.3
- python: 3.4
env: DJANGO=2.2 PG=9.4
- python: 3.4
env: DJANGO=2.2 PG=9.5
- python: 3.4
env: DJANGO=2.2 PG=9.6
- python: 3.4
env: DJANGO=2.2 PG=10
- python: 3.4
env: DJANGO=2.2 PG=11
# Django 3.0+ doesn't support python 3.5
- python: 3.5
env: DJANGO=3.0 PG=9.4
- python: 3.5
env: DJANGO=3.0 PG=9.5
- python: 3.5
env: DJANGO=3.0 PG=9.6
- python: 3.5
env: DJANGO=3.0 PG=10
- python: 3.5
env: DJANGO=3.0 PG=11
- python: 3.5
env: DJANGO=3.0 PG=12

# Django 3.0+ doesn't support Postgresql 9.4
- python: 3.6
env: DJANGO=3.0 PG=9.4
- python: 3.7
env: DJANGO=3.0 PG=9.4
- python: 3.8
env: DJANGO=3.0 PG=9.4

# Django 1.7 doesn't support python 3.5+
- python: 3.5
env: DJANGO=1.7 PG=9.3
- python: 3.5
env: DJANGO=1.7 PG=9.4
- python: 3.5
Expand All @@ -150,8 +162,8 @@ matrix:
env: DJANGO=1.7 PG=10
- python: 3.5
env: DJANGO=1.7 PG=11
- python: 3.6
env: DJANGO=1.7 PG=9.3
- python: 3.5
env: DJANGO=1.7 PG=12
- python: 3.6
env: DJANGO=1.7 PG=9.4
- python: 3.6
Expand All @@ -162,8 +174,8 @@ matrix:
env: DJANGO=1.7 PG=10
- python: 3.6
env: DJANGO=1.7 PG=11
- python: 3.7
env: DJANGO=1.7 PG=9.3
- python: 3.6
env: DJANGO=1.7 PG=12
- python: 3.7
env: DJANGO=1.7 PG=9.4
- python: 3.7
Expand All @@ -174,11 +186,23 @@ matrix:
env: DJANGO=1.7 PG=10
- python: 3.7
env: DJANGO=1.7 PG=11
- python: 3.7
env: DJANGO=1.7 PG=12
- python: 3.8
env: DJANGO=1.7 PG=9.4
- python: 3.8
env: DJANGO=1.7 PG=9.5
- python: 3.8
env: DJANGO=1.7 PG=9.6
- python: 3.8
env: DJANGO=1.7 PG=10
- python: 3.8
env: DJANGO=1.7 PG=11
- python: 3.8
env: DJANGO=1.7 PG=12

# python 3.6 has deprecated issue with django before 1.11
# python 3.6+ has deprecated issue with django before 1.11
# https://stackoverflow.com/questions/41343263/provide-classcell-example-for-python-3-6-metaclass\
- python: 3.6
env: DJANGO=1.8 PG=9.3
- python: 3.6
env: DJANGO=1.8 PG=9.4
- python: 3.6
Expand All @@ -189,8 +213,8 @@ matrix:
env: DJANGO=1.8 PG=10
- python: 3.6
env: DJANGO=1.8 PG=11
- python: 3.7
env: DJANGO=1.8 PG=9.3
- python: 3.6
env: DJANGO=1.8 PG=12
- python: 3.7
env: DJANGO=1.8 PG=9.4
- python: 3.7
Expand All @@ -201,8 +225,20 @@ matrix:
env: DJANGO=1.8 PG=10
- python: 3.7
env: DJANGO=1.8 PG=11
- python: 3.6
env: DJANGO=1.9 PG=9.3
- python: 3.7
env: DJANGO=1.8 PG=12
- python: 3.8
env: DJANGO=1.8 PG=9.4
- python: 3.8
env: DJANGO=1.8 PG=9.5
- python: 3.8
env: DJANGO=1.8 PG=9.6
- python: 3.8
env: DJANGO=1.8 PG=10
- python: 3.8
env: DJANGO=1.8 PG=11
- python: 3.8
env: DJANGO=1.8 PG=12
- python: 3.6
env: DJANGO=1.9 PG=9.4
- python: 3.6
Expand All @@ -212,9 +248,7 @@ matrix:
- python: 3.6
env: DJANGO=1.9 PG=10
- python: 3.6
env: DJANGO=1.9 PG=11
- python: 3.7
env: DJANGO=1.9 PG=9.3
env: DJANGO=1.9 PG=12
- python: 3.7
env: DJANGO=1.9 PG=9.4
- python: 3.7
Expand All @@ -225,8 +259,20 @@ matrix:
env: DJANGO=1.9 PG=10
- python: 3.7
env: DJANGO=1.9 PG=11
- python: 3.6
env: DJANGO=1.10 PG=9.3
- python: 3.7
env: DJANGO=1.9 PG=12
- python: 3.8
env: DJANGO=1.9 PG=9.4
- python: 3.8
env: DJANGO=1.9 PG=9.5
- python: 3.8
env: DJANGO=1.9 PG=9.6
- python: 3.8
env: DJANGO=1.9 PG=10
- python: 3.8
env: DJANGO=1.9 PG=11
- python: 3.8
env: DJANGO=1.9 PG=12
- python: 3.6
env: DJANGO=1.10 PG=9.4
- python: 3.6
Expand All @@ -237,8 +283,8 @@ matrix:
env: DJANGO=1.10 PG=10
- python: 3.6
env: DJANGO=1.10 PG=11
- python: 3.7
env: DJANGO=1.10 PG=9.3
- python: 3.6
env: DJANGO=1.10 PG=12
- python: 3.7
env: DJANGO=1.10 PG=9.4
- python: 3.7
Expand All @@ -249,13 +295,29 @@ matrix:
env: DJANGO=1.10 PG=10
- python: 3.7
env: DJANGO=1.10 PG=11

- python: 3.7
env: DJANGO=1.10 PG=12
- python: 3.8
env: DJANGO=1.10 PG=9.4
- python: 3.8
env: DJANGO=1.10 PG=9.5
- python: 3.8
env: DJANGO=1.10 PG=9.6
- python: 3.8
env: DJANGO=1.10 PG=10
- python: 3.8
env: DJANGO=1.10 PG=11
- python: 3.8
env: DJANGO=1.10 PG=12

before_install:
# Use default PostgreSQL 11 port
# Set up PostgreSQL 11 and 12
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/11/main/postgresql.conf
- sudo cp /etc/postgresql/{10,11}/main/pg_hba.conf

- sudo sed -i 's/port = 5434/port = 5432/' /etc/postgresql/12/main/postgresql.conf
- sudo cp /etc/postgresql/{10,12}/main/pg_hba.conf

# Start PostgreSQL version we need
- sudo systemctl stop postgresql
- sudo systemctl start postgresql@$PG-main
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ A small library implementing PostgreSQL ability to return rows in DML statements
[Link to PostgreSQL docs](https://www.postgresql.org/docs/10/static/sql-update.html)

## <a name="requirements">Requirements</a>
* Python 2.7 or Python 3.4+
* Python 2.7 or Python 3.5+
* django >= 1.7
Previous versions may also work, but haven't been tested.
bulk_create_returning method doesn't support .only() and .defer() filters for django before 1.10.
* pytz
* six
* typing
* psycopg2
* PostgreSQL 9.3+
* PostgreSQL 9.4+
Previous versions may also work, but haven't been tested.

## <a name="installation">Installation</a>
Expand Down
Loading

0 comments on commit 4b26894

Please sign in to comment.