diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e9c72e8..daea1a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: @@ -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 @@ -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: @@ -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 @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index df5385b..4780124 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/examples/demo_project/master_service/requirements.txt b/examples/demo_project/master_service/requirements.txt index 151f245..3ff6c24 100644 --- a/examples/demo_project/master_service/requirements.txt +++ b/examples/demo_project/master_service/requirements.txt @@ -1,4 +1,4 @@ -django==3.2.5 +django==3.2.10 psycopg2==2.9.1 djangorestframework==3.12.4 django-cqrs diff --git a/examples/demo_project/replica_service/requirements.txt b/examples/demo_project/replica_service/requirements.txt index 802eb08..5978a62 100644 --- a/examples/demo_project/replica_service/requirements.txt +++ b/examples/demo_project/replica_service/requirements.txt @@ -1,4 +1,4 @@ -django==3.2.5 +django==3.2.10 djangorestframework==3.12.4 mysqlclient django-redis diff --git a/integration_tests/Dockerfile.Master b/integration_tests/Dockerfile.Master index d7bc834..735c3af 100644 --- a/integration_tests/Dockerfile.Master +++ b/integration_tests/Dockerfile.Master @@ -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 \ diff --git a/integration_tests/Dockerfile.MasterV1 b/integration_tests/Dockerfile.MasterV1 index 2cd5cb8..2445ff1 100644 --- a/integration_tests/Dockerfile.MasterV1 +++ b/integration_tests/Dockerfile.MasterV1 @@ -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 \ diff --git a/integration_tests/Dockerfile.Replica b/integration_tests/Dockerfile.Replica index 06982f1..3ad43b6 100644 --- a/integration_tests/Dockerfile.Replica +++ b/integration_tests/Dockerfile.Replica @@ -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 \ diff --git a/integration_tests/Dockerfile.ReplicaV1 b/integration_tests/Dockerfile.ReplicaV1 index 33fbcc1..4382a83 100644 --- a/integration_tests/Dockerfile.ReplicaV1 +++ b/integration_tests/Dockerfile.ReplicaV1 @@ -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 \ diff --git a/integration_tests/master_settings.py b/integration_tests/master_settings.py index 5b97c2d..2b0e78d 100644 --- a/integration_tests/master_settings.py +++ b/integration_tests/master_settings.py @@ -59,3 +59,5 @@ 'CQRS_MESSAGE_TTL': 3600, }, } + +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' diff --git a/integration_tests/replica_settings.py b/integration_tests/replica_settings.py index 274006b..cffa7da 100644 --- a/integration_tests/replica_settings.py +++ b/integration_tests/replica_settings.py @@ -68,3 +68,5 @@ 'dead_message_ttl': 5, }, } + +DEFAULT_AUTO_FIELD = 'django.db.models.AutoField' diff --git a/requirements/dev.txt b/requirements/dev.txt index bc46d0f..efa79b8 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -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 diff --git a/tests/dj_master/models.py b/tests/dj_master/models.py index 0060b01..52f6103 100644 --- a/tests/dj_master/models.py +++ b/tests/dj_master/models.py @@ -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) diff --git a/tests/dj_replica/models.py b/tests/dj_replica/models.py index 03a3160..e3326ce 100644 --- a/tests/dj_replica/models.py +++ b/tests/dj_replica/models.py @@ -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) @@ -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):