Gate Search on PostgreSQL in module CI
This commit is contained in:
@@ -7,6 +7,18 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
module-matrix:
|
module-matrix:
|
||||||
runs-on: ubuntu-latest
|
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:
|
steps:
|
||||||
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
|
||||||
with:
|
with:
|
||||||
@@ -33,6 +45,21 @@ jobs:
|
|||||||
- name: Install WebUI release dependencies with test scripts
|
- name: Install WebUI release dependencies with test scripts
|
||||||
working-directory: govoplan
|
working-directory: govoplan
|
||||||
run: bash tools/release/install-webui-release-dependencies.sh ../govoplan-core/webui
|
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
|
- name: Run module matrix and contract tests
|
||||||
working-directory: govoplan
|
working-directory: govoplan
|
||||||
run: GOVOPLAN_CORE_ROOT="$PWD/../govoplan-core" PYTHON="$PWD/.venv/bin/python" bash tools/checks/check-module-matrix.sh
|
run: GOVOPLAN_CORE_ROOT="$PWD/../govoplan-core" PYTHON="$PWD/.venv/bin/python" bash tools/checks/check-module-matrix.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user