Conversation
… version detection - Updated GitHub Actions workflow to include testing step. - Added support for detecting PostgreSQL version from the base image. - Introduced CLI arguments for test mode and PostgreSQL version. - Enhanced Dockerfile to conditionally run tests based on TEST_MODE. - Updated README files with new status badges and improved instructions. - Added configuration management for tests.
- Updated Cargo.toml to include sqlx for PostgreSQL support. - Modified makefile to build and run tests in a Docker container with PostgreSQL. - Refactored common.rs to clean up whitespace. - Enhanced extensions module to include a run_tests function for testing extensions. - Implemented run_test functions for pgmq, pgvector, and postgis extensions to verify their installation. - Updated main.rs to initialize the database pool and run extension tests in test mode. - Removed obsolete config and tests modules, replacing them with a new test module for database pool management.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive test mode for the Docker-based PostgreSQL extensions installer, enabling automated extension installation and validation in CI. It also improves error handling, adds extension tests, and enhances documentation and build workflows.
Testing and CI improvements:
.github/workflows/pr-test.yml) to build images in test mode, run automated extension tests inside containers, and summarize test results. The workflow now excludes thelatesttag from the matrix, uses a newTEST_MODEbuild argument, and loads images for testing. [1] [2]makefileto add atesttarget that builds a test image withTEST_MODE=trueand runs extension tests in a container.Dockerfileto support aTEST_MODEbuild argument, running tests if enabled and only removing the installer binary in production images. [1] [2]Extension testing and error handling:
run_testsfunction insrc/extensions/mod.rsand individualrun_testfunctions for each extension (PostGIS, pgvector, pgmq) to validate their installation using SQL queries. [1] [2] [3] [4]src/common.rs.Dependency and documentation updates:
clapandsqlxdependencies to support CLI argument parsing and database testing.Docker image publishing:
latesttag from the Docker image publishing workflow to avoid ambiguity and ensure explicit versioning. (.github/workflows/docker-build.yml)Installer core improvements:
installerfunction insrc/core.rsto orchestrate extension installation and cleanup, using improved error handling and version parsing.These changes collectively improve the reliability, maintainability, and testability of the PostgreSQL extensions Docker image pipeline.