From 4c1225fb228544847a0e617382d27800e4c0dc76 Mon Sep 17 00:00:00 2001 From: Maiz Date: Fri, 9 Jan 2026 00:54:34 +0500 Subject: [PATCH 1/3] replace emoji in an error message --- web/src/page_tracker/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/page_tracker/app.py b/web/src/page_tracker/app.py index c854969..0c14c9d 100644 --- a/web/src/page_tracker/app.py +++ b/web/src/page_tracker/app.py @@ -13,7 +13,7 @@ def index(): page_views = redis().incr("page_views") except RedisError: app.logger.exception("Redis Error") - return "Sorry, something went wrong \N{PENSIVE FACE}", 500 + return "Sorry, something went wrong \N{thinking FACE}", 500 else: return f"This page has been seen {page_views} times." From 9175522e8d3e4865990972ab073e5a277be99d3d Mon Sep 17 00:00:00 2001 From: Maiz Date: Fri, 9 Jan 2026 01:13:13 +0500 Subject: [PATCH 2/3] fix the failing unit test --- web/tests/unit/test_app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/tests/unit/test_app.py b/web/tests/unit/test_app.py index f6c3c9c..ab40448 100644 --- a/web/tests/unit/test_app.py +++ b/web/tests/unit/test_app.py @@ -11,7 +11,7 @@ def test_should_handle_redis_connection_error(mock_redis, http_client): #Then assert response.status_code == 500 - assert response.text == "Sorry, something went wrong \N{pensive face}" + assert response.text == "Sorry, something went wrong \N{thinking face}" @unittest.mock.patch("src.page_tracker.app.redis") def test_should_call_redis_incr(mock_redis, http_client): From bd3d9ed894adcf84c799c1f0244272f1870e3561 Mon Sep 17 00:00:00 2001 From: Maiz Date: Fri, 9 Jan 2026 01:38:00 +0500 Subject: [PATCH 3/3] add ci.yml from origin master branch --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e69de29..f3800d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: Continuous Integration + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + build: + name: Build Docker image and run end-to-end tests + runs-on: ubuntu-latest + steps: + - name: Checkout code from GitHub + uses: actions/checkout@v5 + + - name: Run end-to-end tests + run: > + docker compose --profile testing up + --build --exit-code-from test-service + + # временно отключено + #- name: Login to Docker Hub + # uses: docker/login-action@v3 + # if: ${{ github.event_name == 'push' }} + # with: + # username: ${{ secrets.DOCKERHUB_USERNAME }} + # password: ${{ secrets.DOCKERHUB_TOKEN }} + + # временно отключено + #- name: Push image to Docker Hub + # uses: docker/build-push-action@v6 + # if: ${{ github.event_name == 'push' }} + # with: + # context: ./web + # push: true + # tags: | + # ${{ secrets.DOCKERHUB_USERNAME }}/page-tracker:${{ github.sha }} + # ${{ secrets.DOCKERHUB_USERNAME }}/page-tracker:latest + + + +