From 31e541ac92e5a537c3a4a0db41491d85628f06e2 Mon Sep 17 00:00:00 2001 From: Asim Date: Sat, 11 May 2024 19:22:46 +0300 Subject: [PATCH] upgrade Django to 4.2 --- .github/workflows/docker-test.yml | 21 +++++++-------------- setup/requirements.txt | 6 +++--- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 0b986f2..a4ba417 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -20,26 +20,19 @@ jobs: - name: Create New Django Project run: if [ -x ./setup/set-new-django-project.bash ]; then echo ${PROJECT_NAME} | make init; fi; - - name: Copy Env File - run: cp ${PROJECT_NAME}/.env.sample ${PROJECT_NAME}/.env + - name: Copy Tests Env File + run: cp ./${PROJECT_NAME}/.env.sample ./${PROJECT_NAME}/.env - name: Build Docker run: > - GIT_REF=$(git rev-parse --verify HEAD); docker image build --no-cache - -t ${PROJECT_IMAGE_NAME}:${GIT_REF} - . + -t ${PROJECT_IMAGE_NAME}:tests + -f ./deploy/Dockerfile . ; - name: Run All Django Tests run: > - GIT_REF=$(git rev-parse --verify HEAD); docker container run --rm - -e DJANGO_SETTINGS_MODULE=${PROJECT_NAME}.settings.docker_dev - ${PROJECT_IMAGE_NAME}:${GIT_REF} 'python3 manage.py test' + -e DJANGO_SETTINGS_MODULE=${PROJECT_NAME}.settings.docker_testing + -e DATABASE_URL=sqlite:///db.sqlite3 + ${PROJECT_IMAGE_NAME}:tests 'python3 manage.py test' - - name: Debug - run: > - ls -al ./; - ls -al ./init_test_github; - ls -al ./deploy; - ls -al ./.github/workflows; diff --git a/setup/requirements.txt b/setup/requirements.txt index 12ebc58..01e0c29 100644 --- a/setup/requirements.txt +++ b/setup/requirements.txt @@ -1,4 +1,4 @@ -Django==3.2 +Django==4.2 boto3==1.24.10 gunicorn==20.1.0 django-storages==1.12.3 @@ -9,7 +9,7 @@ python-dotenv==1.0.0 psycopg2==2.9.7 # REST -djangorestframework==3.13.1 +djangorestframework==3.15.1 djangorestframework-simplejwt==5.2.0 # OpenAPI schema support @@ -23,4 +23,4 @@ fpdf==1.7.2 qrcode==7.3.1 # captcha -django-simple-captcha==0.5.17 +django-simple-captcha==0.5.20