diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ad69bac8..df5d889e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -20,14 +20,14 @@ jobs: - name: 'Create .env file' run: | - echo ${{ secrets.ENV_FILE }} > .env + echo "secrets.ENV_FILE" > .env - name: Build Docker run: docker-compose --env-file .env build - name: Run Tests run: | - docker-compose run --name backend_test backend python manage.py test picture_of_remark/tests.py users/tests.py remark_at_building/tests.py lobby/tests.py email_template/tests.py building/tests.py role/tests.py building_comment/tests.py building_on_tour/tests.py garbage_collection/tests.py manual/tests.py region/tests.py tour/tests.py --with-coverage --cover-package=lobby,email_template,building,building_on_tour,garbage_collection,manual,region,tour,building_comment,role,remark_at_building,picture_of_remark,users --with-xunit --xunit-file=/app/coverage.xml + docker-compose run --env-file .env --name backend_test backend python manage.py test picture_of_remark/tests.py users/tests.py remark_at_building/tests.py lobby/tests.py email_template/tests.py building/tests.py role/tests.py building_comment/tests.py building_on_tour/tests.py garbage_collection/tests.py manual/tests.py region/tests.py tour/tests.py --with-coverage --cover-package=lobby,email_template,building,building_on_tour,garbage_collection,manual,region,tour,building_comment,role,remark_at_building,picture_of_remark,users --with-xunit --xunit-file=/app/coverage.xml docker cp backend_test:/app/coverage.xml coverage.xml docker-compose down diff --git a/backend/base/signals.py b/backend/base/signals.py index 1f725b2a..8a87ed38 100644 --- a/backend/base/signals.py +++ b/backend/base/signals.py @@ -32,19 +32,17 @@ def progress_current_building_index(sender, instance: RemarkAtBuilding, **kwargs "current_building_index": student_on_tour.current_building_index, }, ) - elif (instance.type == RemarkAtBuilding.VERTREK and - student_on_tour.current_building_index == student_on_tour.max_building_index): + elif ( + instance.type == RemarkAtBuilding.VERTREK + and student_on_tour.current_building_index == student_on_tour.max_building_index + ): student_on_tour.completed_tour = timezone.now() student_on_tour.save() # Broadcast update to websocket channel_layer = get_channel_layer() async_to_sync(channel_layer.group_send)( - "student_on_tour_updates", - { - "type": 'student.on.tour.completed', - "student_on_tour_id": student_on_tour.id - } + "student_on_tour_updates", {"type": "student.on.tour.completed", "student_on_tour_id": student_on_tour.id} ) diff --git a/backend/requirements.txt b/backend/requirements.txt index 88af991c..cd45c5d7 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -40,7 +40,7 @@ msgpack==1.0.5 nose==1.3.7 oauthlib==3.2.2 phonenumbers==8.13.11 -pip==23.0.1 +pip==23.1.2 psycopg==3.1.9 psycopgbinary==0.0.1 pyOpenSSL==23.1.1 diff --git a/nginx/Dockerfile b/nginx/Dockerfile index c5d0f01f..71da54d5 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -2,4 +2,4 @@ FROM nginx:alpine ARG ENVIRONMENT -COPY nginx${ENVIRONMENT:+.$ENVIRONMENT}.conf /etc/nginx/nginx.conf \ No newline at end of file +COPY nginx.${ENVIRONMENT:-development}.conf /etc/nginx/nginx.conf \ No newline at end of file