Skip to content

Commit

Permalink
♻️ introduce webserver 4 tests (#6663)
Browse files Browse the repository at this point in the history
  • Loading branch information
matusdrobuliak66 authored Nov 4, 2024
1 parent 24445c0 commit 7d52bf7
Show file tree
Hide file tree
Showing 27 changed files with 61 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci-testing-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,51 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

unit-test-webserver-04:
needs: changes
if: ${{ needs.changes.outputs.webserver == 'true' || github.event_name == 'push' }}
timeout-minutes: 25 # if this timeout gets too small, then split the tests
name: "[unit] webserver 04"
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: ["3.11"]
os: [ubuntu-22.04]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: setup docker buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
- name: setup python environment
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.x"
enable-cache: false
cache-dependency-glob: "**/web/server/requirements/ci.txt"
- name: show system version
run: ./ci/helpers/show_system_versions.bash
- name: install webserver
run: ./ci/github/unit-testing/webserver.bash install
- name: test
run: ./ci/github/unit-testing/webserver.bash test_with_db 04
- uses: codecov/[email protected]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
flags: unittests #optional
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}

unit-test-storage:
needs: changes
if: ${{ needs.changes.outputs.storage == 'true' || github.event_name == 'push' }}
Expand Down Expand Up @@ -1875,6 +1920,7 @@ jobs:
unit-test-webserver-01,
unit-test-webserver-02,
unit-test-webserver-03,
unit-test-webserver-04,
]
runs-on: ubuntu-latest
steps:
Expand Down
15 changes: 15 additions & 0 deletions services/web/server/tests/unit/with_dbs/04/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-variable


import pytest


@pytest.fixture
def app_environment(
app_environment: dict[str, str], monkeypatch: pytest.MonkeyPatch
) -> dict[str, str]:
# NOTE: overrides app_environment
monkeypatch.setenv("WEBSERVER_GARBAGE_COLLECTOR", "null")
return app_environment | {"WEBSERVER_GARBAGE_COLLECTOR": "null"}

0 comments on commit 7d52bf7

Please sign in to comment.