diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-08 21:46:23 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-10-08 21:46:23 -0400 |
| commit | f4f45436b479d8c6eebcf7a503d3c1e3a73c68b1 (patch) | |
| tree | ecf372e43c7a6303c59366620c590c544c273988 /scripts/test-postgresql.sh | |
| parent | Update homebrew instructions (diff) | |
| download | cli-f4f45436b479d8c6eebcf7a503d3c1e3a73c68b1.zip | |
Add test pipeline with sourcehut
Diffstat (limited to 'scripts/test-postgresql.sh')
| -rwxr-xr-x | scripts/test-postgresql.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/test-postgresql.sh b/scripts/test-postgresql.sh new file mode 100755 index 0000000..38decae --- /dev/null +++ b/scripts/test-postgresql.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -e + +echo "Running PostgreSQL tests..." +env $(cat .env.postgresql | xargs) docker-compose -f docker-compose.postgresql.yml up -d + +echo "Waiting for PostgreSQL to be ready..." +sleep 10 +until docker exec bolt_postgresql_db pg_isready -U postgres 2>/dev/null; do + echo "Waiting for PostgreSQL..." + sleep 5 +done +echo "PostgreSQL is ready." + +env $(cat .env.postgresql | xargs) go test -p 1 -tags "postgresql" -covermode=count -coverprofile=coverage-postgresql.out ./... + +docker-compose -f docker-compose.postgresql.yml down +echo "PostgreSQL tests completed." |