Skip to content

Commit 9b75404

Browse files
committed
fix: change step name to avoid duplicate heading and add testing docs
- Change step name from 'Summary' to 'Output' to prevent duplication with job name - Add comprehensive Testing section to README with local and CI/CD instructions - Document architecture limitations for local testing
1 parent 2f01bf0 commit 9b75404

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

.github/workflows/test_images.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ jobs:
125125
runs-on: ubuntu-latest
126126
if: always()
127127
steps:
128-
- name: Summary
128+
- name: Output
129129
run: |
130130
echo "| Input | Value |" >> $GITHUB_STEP_SUMMARY
131131
echo "|-------|-------|" >> $GITHUB_STEP_SUMMARY

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,54 @@ volumes:
112112
- Mutable tags also exist for:
113113
- The latest image for a given Postgres major.minor + spock major version, `pg<postgres major.minor>-spock<major>-<flavor>` , e.g. `17.6-spock5-standard`
114114
- The latest image for a given Postgres major + spock major version, `pg<postgres major>-spock<major>-<flavor>`, e.g. `17-spock5-standard`
115+
116+
## Testing
117+
118+
This repository includes a comprehensive test suite to validate Postgres images. The tests verify:
119+
- Default entrypoint functionality
120+
- Patroni entrypoint (standard images only)
121+
- PostgreSQL connectivity and version checks
122+
- Extension availability and functionality (Spock, LOLOR, Snowflake, pgvector, PostGIS, pgaudit)
123+
- pgBackRest installation (standard images only)
124+
125+
### Running Tests Locally
126+
127+
To run tests locally, you'll need:
128+
- Go 1.24.11 or later
129+
- Docker installed and running
130+
- Access to pull the image you want to test
131+
132+
Run the test suite using the Makefile:
133+
134+
```bash
135+
make test-image IMAGE=<image> FLAVOR=<minimal|standard>
136+
```
137+
138+
Example:
139+
140+
```bash
141+
make test-image IMAGE=ghcr.io/pgedge/pgedge-postgres:17-spock5-standard FLAVOR=standard
142+
```
143+
144+
Or run directly with Go:
145+
146+
```bash
147+
cd tests && go run main.go -image <image> -flavor <minimal|standard>
148+
```
149+
150+
### Local Testing Limitations
151+
152+
**Architecture Limitations:** When running tests locally, you can only test images that match your local machine's architecture. For example:
153+
- On an x86_64/amd64 machine, you can only test amd64 images
154+
- On an ARM64 machine, you can only test arm64 images
155+
156+
To test images for multiple architectures (x86 and ARM), use the GitHub Actions workflow which runs tests on both `ubuntu-latest` (x86) and `ubuntu-24.04-arm` (ARM) runners.
157+
158+
### CI/CD Testing
159+
160+
The GitHub Actions workflow (`.github/workflows/test_images.yaml`) can be triggered manually to test images across multiple architectures. The workflow accepts:
161+
- **Package Repository**: The container registry repository name
162+
- **Tags**: Comma-separated list of image tags to test
163+
- **Architectures**: Comma-separated list of architectures (`x86,arm`)
164+
165+
The workflow will automatically test each tag on each specified architecture.

0 commit comments

Comments
 (0)