Skip to content

Commit

Permalink
Merge pull request #57 from cloudblue/feature/LITE-21519
Browse files Browse the repository at this point in the history
LITE-21519 Added support to Django 4.0 and bumped deps and workflows
  • Loading branch information
maxipavlovic authored Dec 17, 2021
2 parents 852953a + 1262c8e commit e3fb351
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 27 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ on:
branches: [ master ]

jobs:
build_3_6_7_django_3_1:
name: Build on Python 3.6 and 3.7 and django 3.1
build_3_6_7_8_django_2_2:
name: Build on Python 3.6, 3.7, 3.8 and django 2.2
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -30,7 +30,7 @@ jobs:
pip install -r requirements/dev.txt
pip install -r requirements/test.txt
pip install pytest-cov
pip install django==3.1.*
pip install django==2.2.*
- name: Linting
run: |
flake8
Expand All @@ -43,12 +43,12 @@ jobs:
- name: Compatibility tests
run: |
./travis_compat_tests.sh
build_3_8_django_2_2:
name: Build on Python 3.8 django 2.2
build_3_8_9_django_3_2:
name: Build on Python 3.8, 3.9 django 3.2
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8 ]
python-version: [3.8, 3.9]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -63,7 +63,7 @@ jobs:
pip install -r requirements/dev.txt
pip install -r requirements/test.txt
pip install pytest-cov
pip install django==2.2.*
pip install django==3.2.*
- name: Linting
run: |
flake8
Expand All @@ -76,12 +76,12 @@ jobs:
- name: Compatibility tests
run: |
./travis_compat_tests.sh
build_3_8_django_3_1:
name: Build on Python 3.8 django 3.1
build_3_10_django_4_0:
name: Build on Python 3.10 django 4.0
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.8 ]
python-version: [3.10.1]
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -96,7 +96,7 @@ jobs:
pip install -r requirements/dev.txt
pip install -r requirements/test.txt
pip install pytest-cov
pip install django==3.1.*
pip install django==4.0.*
- name: Linting
run: |
flake8
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- name: Wait sonar to process report
uses: jakejarvis/wait-action@master
with:
time: '60s'
time: '120s'
- name: SonarQube Quality Gate check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
pip install -r requirements/dev.txt
pip install -r requirements/test.txt
pip install pytest-cov
pip install django==3.1.*
pip install django==3.2.*
- name: Linting
run: |
flake8
Expand Down
2 changes: 1 addition & 1 deletion examples/demo_project/master_service/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
django==3.2.5
django==3.2.10
psycopg2==2.9.1
djangorestframework==3.12.4
django-cqrs
2 changes: 1 addition & 1 deletion examples/demo_project/replica_service/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
django==3.2.5
django==3.2.10
djangorestframework==3.12.4
mysqlclient
django-redis
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Dockerfile.Master
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8
FROM python:3.10

ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Dockerfile.MasterV1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8
FROM python:3.10

ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Dockerfile.Replica
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8
FROM python:3.10

ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/Dockerfile.ReplicaV1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8
FROM python:3.10

ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
Expand Down
2 changes: 2 additions & 0 deletions integration_tests/master_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@
'CQRS_MESSAGE_TTL': 3600,
},
}

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
2 changes: 2 additions & 0 deletions integration_tests/replica_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@
'dead_message_ttl': 5,
},
}

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
8 changes: 4 additions & 4 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Django>= 1.11.20,<4
Django>=2.2.19
pika>=1.0.0
kombu==4.6.*
ujson==3.0.0
kombu>=4.6.*
ujson>=3.0.0
django-model-utils>=4.0.0
python-dateutil >= 2.4
python-dateutil>=2.4
2 changes: 1 addition & 1 deletion tests/dj_master/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class BasicFieldsModel(MasterMixin, models.Model):
CQRS_TRACKED_FIELDS = ALL_BASIC_FIELDS

int_field = models.IntegerField(primary_key=True)
bool_field = models.NullBooleanField()
bool_field = models.BooleanField(null=True)
char_field = models.CharField(max_length=200, null=True)
date_field = models.DateField(null=True)
datetime_field = models.DateTimeField(null=True)
Expand Down
4 changes: 2 additions & 2 deletions tests/dj_replica/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BasicFieldsModelRef(ReplicaMixin, models.Model):
int_field = models.IntegerField(primary_key=True)
char_field = models.CharField(max_length=200)

bool_field = models.NullBooleanField()
bool_field = models.BooleanField(null=True)
date_field = models.DateField(null=True)
datetime_field = models.DateTimeField(null=True)
float_field = models.FloatField(null=True)
Expand All @@ -23,7 +23,7 @@ class BadTypeModelRef(ReplicaMixin, models.Model):
CQRS_ID = 'basic_1'

int_field = models.IntegerField(primary_key=True)
datetime_field = models.NullBooleanField()
datetime_field = models.BooleanField(null=True)


class MappedFieldsModelRef(ReplicaMixin, models.Model):
Expand Down

0 comments on commit e3fb351

Please sign in to comment.