Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ introduce webserver 4 tests #6663

Merged
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
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:
matusdrobuliak66 marked this conversation as resolved.
Show resolved Hide resolved
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"}
Loading