name: Module Matrix on: workflow_dispatch: pull_request: 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: path: govoplan - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 with: python-version: "3.12" - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 with: node-version: "22" - name: Use anonymous HTTPS for public GovOPlaN repositories run: | git config --global --add url."https://git.add-ideas.de/GovOPlaN/govoplan".insteadOf "git@git.add-ideas.de:GovOPlaN/govoplan" git config --global --add url."https://git.add-ideas.de/GovOPlaN/govoplan".insteadOf "ssh://git@git.add-ideas.de/GovOPlaN/govoplan" - name: Bootstrap GovOPlaN repositories working-directory: govoplan run: python tools/repo/bootstrap-repositories.py --parent .. --transport public-https --exclude-repo addideas-govoplan-website - name: Install backend release dependencies working-directory: govoplan run: | python -m venv .venv .venv/bin/python tools/repo/sync-python-environment.py --requirements requirements-release.txt --python .venv/bin/python --upgrade-pip .venv/bin/python -m pip install '../govoplan-core[dev]' - 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