[feature]: add test pipeline for testing Postgres parser using different applications #1880
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.
closes [feature]: add test pipeline for testing Postgres parser using different applications
This pull request adds a new GitHub Actions workflow file named test-go-postgres.yml for testing the GinApp application with PostgreSQL. The workflow is designed to automate the testing process and includes the following steps:
Checkout Repository:
Checks out the main repository where the workflow is defined.
Download Keploy Build Binary: Downloads a Keploy build binary artifact from the actions artifact storage.
Give Permission to Binary: Sets executable permissions for the Keploy build binary.
Download Latest Keploy Binary: Downloads the latest Keploy binary release from GitHub and moves it to /usr/local/bin.
Get the Pilot for Tests and Mocks Assertion: Downloads the latest pilot binary for test and mock assertions, sets the executable permission, and moves it to /usr/local/bin.
Checkout to the Samples-Go Repository: Checks out the samples-go repository at the native-linux branch.
Build the Gin-Postgres Application: Navigates to the gin-postgres directory and builds the Go application.
Add Noisy Fields in the Config File: Placeholder step for adding any noisy fields in the configuration file if required.
Run Testing Script for Gin-Postgres Application: Uses a custom GitHub action (.github/actions/tester) to run the testing script for the gin-postgres application with specified parameters.
PostgreSQL Service:
Services Section: Configures a PostgreSQL service using the postgres:latest Docker image.
Environment Variables: Sets up the POSTGRES_USER, POSTGRES_PASSWORD, and POSTGRES_DB environment variables.
Ports and Health Checks: Exposes port 5432 and sets up health checks to ensure the PostgreSQL service is ready before running the tests.
This new workflow ensures that the GinApp application using PostgreSQL is properly tested with Keploy, automating the setup and execution of tests in a CI/CD pipeline.
Changes Introduced:
Added a new GitHub Actions workflow file: .github/workflows/test-go-postgres.yml.
Instructions for Reviewers:
Please review the new workflow file for accuracy and completeness.
Ensure that the PostgreSQL service configuration aligns with the application's requirements.
Verify that the steps and commands for building and testing the application are correct.
I have read the CLA Document and I hereby sign the CLA.