Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably instead of waiting 120s better to follow the strategy, we adopt for connect-cli.
It means a job just for Sonar that depends on previous builds. It seems that quality check fails only when repeated many times due to a test matrix.

Please take a look https://github.com/cloudblue/connect-cli/blob/a02728c5c991ecf76768da6331bcfe76d6c863c4/.github/workflows/build.yml#L37

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will leave it up to you :)))

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