From 3f9567af18f7557128fb938ebb42e9a66c41b46f Mon Sep 17 00:00:00 2001 From: Albrecht Degering Date: Wed, 29 Jul 2026 20:37:08 +0200 Subject: [PATCH] Gate Search on PostgreSQL in module CI --- .gitea/workflows/module-matrix.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitea/workflows/module-matrix.yml b/.gitea/workflows/module-matrix.yml index 5bfe855..13c6dbd 100644 --- a/.gitea/workflows/module-matrix.yml +++ b/.gitea/workflows/module-matrix.yml @@ -7,6 +7,18 @@ on: jobs: module-matrix: runs-on: ubuntu-latest + services: + postgres: + image: postgres:16-alpine + env: + POSTGRES_DB: govoplan_test + POSTGRES_USER: govoplan + POSTGRES_PASSWORD: govoplan_test + options: >- + --health-cmd "pg_isready -U govoplan -d govoplan_test" + --health-interval 5s + --health-timeout 5s + --health-retries 20 steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 with: @@ -33,6 +45,21 @@ jobs: - name: Install WebUI release dependencies with test scripts working-directory: govoplan run: bash tools/release/install-webui-release-dependencies.sh ../govoplan-core/webui + - name: Validate Search against PostgreSQL + working-directory: govoplan + env: + GOVOPLAN_SEARCH_POSTGRES_URL: postgresql+psycopg://govoplan:govoplan_test@postgres:5432/govoplan_test + run: | + GOVOPLAN_CORE_ROOT="$PWD/../govoplan-core" .venv/bin/python tools/checks/postgres-integration-check.py \ + --database-url "$GOVOPLAN_SEARCH_POSTGRES_URL" \ + --module-set search=tenancy,access,search \ + --reset-schema \ + --skip-retirement-atomicity + PYTHONPATH="$PWD/../govoplan-search/src:$PWD/../govoplan-core/src" \ + .venv/bin/python -m unittest discover \ + -s ../govoplan-search/tests \ + -p test_postgres_search.py \ + -v - name: Run module matrix and contract tests working-directory: govoplan run: GOVOPLAN_CORE_ROOT="$PWD/../govoplan-core" PYTHON="$PWD/.venv/bin/python" bash tools/checks/check-module-matrix.sh