mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-07 02:07:52 +02:00
[PostGres Checkpointer] Run CI on PG15 as well (#1953)
This commit is contained in:
@@ -5,20 +5,33 @@
|
||||
######################
|
||||
|
||||
start-postgres:
|
||||
docker compose -f tests/compose-postgres.yml up -V --force-recreate --wait
|
||||
POSTGRES_VERSION=${POSTGRES_VERSION:-16} docker compose -f tests/compose-postgres.yml up -V --force-recreate --wait
|
||||
|
||||
stop-postgres:
|
||||
docker compose -f tests/compose-postgres.yml down
|
||||
|
||||
test:
|
||||
make start-postgres; \
|
||||
poetry run pytest; \
|
||||
EXIT_CODE=$$?; \
|
||||
POSTGRES_VERSIONS ?= 15 16
|
||||
test_pg_version:
|
||||
@echo "Testing PostgreSQL $(POSTGRES_VERSION)"
|
||||
@POSTGRES_VERSION=$(POSTGRES_VERSION) make start-postgres
|
||||
@poetry run pytest $(TEST)
|
||||
@EXIT_CODE=$$?; \
|
||||
make stop-postgres; \
|
||||
echo "Finished testing PostgreSQL $(POSTGRES_VERSION); Exit code: $$EXIT_CODE"; \
|
||||
exit $$EXIT_CODE
|
||||
|
||||
test:
|
||||
@for version in $(POSTGRES_VERSIONS); do \
|
||||
if ! make test_pg_version POSTGRES_VERSION=$$version; then \
|
||||
echo "Test failed for PostgreSQL $$version"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@echo "All PostgreSQL versions tested successfully"
|
||||
|
||||
TEST ?= .
|
||||
test_watch:
|
||||
make start-postgres; \
|
||||
POSTGRES_VERSION=${POSTGRES_VERSION:-16} make start-postgres; \
|
||||
poetry run ptw $(TEST); \
|
||||
EXIT_CODE=$$?; \
|
||||
make stop-postgres; \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
services:
|
||||
postgres-test:
|
||||
image: postgres:16
|
||||
image: postgres:${POSTGRES_VERSION:-16}
|
||||
ports:
|
||||
- "5441:5432"
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user