Skip to content

DEV: add PostgreSQL CI for dev pull requests - #713

Merged
TThanos3000 merged 1 commit into
devfrom
infra/dev-backend-postgresql-ci
Aug 27, 2026
Merged

DEV: add PostgreSQL CI for dev pull requests#713
TThanos3000 merged 1 commit into
devfrom
infra/dev-backend-postgresql-ci

Conversation

@TThanos3000

@TThanos3000 TThanos3000 commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

Scope

Semantic port of PostgreSQL CI infrastructure from production PR #674 to the current dev branch. No master -> dev merge or broad cherry-pick was used.

The new workflow:

  • runs for pull requests whose base branch is dev;
  • supports workflow_dispatch;
  • starts an isolated PostgreSQL 15 service container with a healthcheck;
  • verifies the PostgreSQL vendor and select_for_update support;
  • checks Django configuration and models;
  • checks migration consistency and applies migrations to an empty database;
  • runs PostgreSQL transaction/vacancy-response targeted tests;
  • automatically includes vacancy.tests.test_vacancy_response_contract_api when the PR DEV: harden vacancy responses and expose applicant state #712 module is present;
  • runs the full backend suite;
  • deterministically removes the retained test database.

The CI settings replace Redis cache, Redis Channels, Celery broker/result storage, and external email with in-process test implementations. HTTPS redirect and React-dev demo seeding are disabled only in the isolated CI settings module.

PostgreSQL compatibility adjustment

The first real PostgreSQL run exposed one pre-existing order-dependent assertion in mailing.tests.test_models_rendering. The test expected database rows in insertion order although the contract does not define that order. It now verifies the same field keys and values by key, matching the production PR #674 adaptation. Mailing business code and behavior are unchanged. Tests from PR #712 are unchanged.

Triggers

  • pull_request with base dev;
  • workflow_dispatch.

There is no push, workflow_run, workflow_call, deploy, SSH, rsync, Docker build, or environment deployment trigger in the new workflow.

Verification

Local:

  • YAML parse and exact trigger assertions: passed;
  • black --check for changed Python files: passed;
  • flake8 for changed Python files: passed;
  • python manage.py check --tag models with procollab.settings_ci: passed;
  • runtime settings isolation assertions: passed;
  • git diff --check: passed;
  • local PostgreSQL test run: unavailable because PostgreSQL is not running locally; not replaced with SQLite.

GitHub Actions:

  • Backend PostgreSQL CI: passed;
  • PostgreSQL vendor and locking preflight: passed;
  • Django checks and migration consistency: passed;
  • all migrations on an empty PostgreSQL database: passed;
  • targeted PostgreSQL tests: 11/11 passed;
  • full PostgreSQL backend suite: 523/523 passed;
  • existing CI Lint: passed;
  • existing CI Tests: passed.

Scope confirmation

@TThanos3000
TThanos3000 force-pushed the infra/dev-backend-postgresql-ci branch from 4d865ff to 0658925 Compare August 27, 2026 18:26
@TThanos3000
TThanos3000 marked this pull request as ready for review August 27, 2026 18:53
@TThanos3000
TThanos3000 merged commit a5198c8 into dev Aug 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant