Skip to content

ci: split build and test into separate jobs, upgrade actions to Node 24 - #1128

Merged
dimitri merged 2 commits into
mainfrom
ci-split-build-test
Jul 6, 2026
Merged

ci: split build and test into separate jobs, upgrade actions to Node 24#1128
dimitri merged 2 commits into
mainfrom
ci-split-build-test

Conversation

@dimitri

@dimitri dimitri commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Previously each of the 21 test matrix cells built its own Docker image from scratch — 21 redundant builds per CI run, each taking ~2 minutes of compile time before a single test ran.

Changes

Workflow restructure:

  • build_images — 4 jobs (one per PG version), builds the test image once and uploads it as a 1-day artifact compressed with zstd
  • run_tests — 21 jobs (same matrix as before), downloads the pre-built image and runs tests with make run-test-prebuilt

This cuts Docker builds from 21 to 4 per run.

Actions upgrade:

  • actions/checkout@v4.2.2v7.0.0 (Node 24)
  • actions/upload-artifact@v7.0.1 (Node 24)
  • actions/download-artifact@v8.0.1 (Node 24)

Fixes the runner deprecation warning: "Node.js 20 is deprecated … actions/checkout@v4.2.2"

New Makefile targets:

make save-test-image   # docker save | zstd → pg_auto_failover_test-pg$(PGVERSION).tar.zst
make load-test-image   # zstd decompress | docker load
make run-test-prebuilt # run tests against a pre-loaded image (no build step)

Tested locally

  • make save-test-image + make load-test-image round-trip confirmed on PG17
  • make run-test-prebuilt PGVERSION=17 TEST=monitor — 17/18 tests pass (1 pre-existing pyroute2 asyncio flakiness in test_replace_monitor, unrelated to this change)

@dimitri dimitri self-assigned this Jul 6, 2026
@dimitri dimitri added Developer productivity Enhancements to ability to ship quality code Packaging and CI Enhancements to our CI integration labels Jul 6, 2026
Previously each of the 21 test matrix cells built its own Docker image,
totalling 21 redundant builds per CI run.

New structure:
- build_images: 4 jobs (one per PG version), builds the test image and
  uploads it as a zstd-compressed artifact (retention: 1 day).
- run_tests: 21 jobs (same matrix as before), downloads the pre-built
  image artifact and runs tests against it via make run-test-prebuilt.

This cuts Docker builds from 21 to 4 per CI run.

Also upgrades all actions/checkout, actions/upload-artifact, and
actions/download-artifact from Node 20 to Node 24 (v7/v7/v8) to
silence the runner deprecation warning.

New Makefile targets:
  save-test-image   docker save | zstd → .tar.zst archive
  load-test-image   zstd decompress | docker load
  run-test-prebuilt like run-test but without the build prerequisite
@dimitri
dimitri force-pushed the ci-split-build-test branch from b3481e0 to 04452a1 Compare July 6, 2026 16:37
The tablespaces suite runs via $(MAKE) -C tests/tablespaces run-test on
the host, not inside the pg_auto_failover_test container.  run-test-prebuilt
was always entering the container, causing a 33s failure for (14, tablespaces)
in CI.  Mirror ci-test's ifeq dispatch so tablespaces takes the host path.
@dimitri
dimitri merged commit 952d399 into main Jul 6, 2026
26 checks passed
@dimitri
dimitri deleted the ci-split-build-test branch July 6, 2026 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Developer productivity Enhancements to ability to ship quality code Packaging and CI Enhancements to our CI integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant