mirror of
https://github.com/ent/ent.git
synced 2026-03-05 19:35:23 +03:00
entc/integration: add integration testing for PG16 and PG17 (#4353)
This commit is contained in:
48
.github/workflows/ci.yml
vendored
48
.github/workflows/ci.yml
vendored
@@ -241,6 +241,30 @@ jobs:
|
|||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
postgres16:
|
||||||
|
image: postgres:16
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: test
|
||||||
|
POSTGRES_PASSWORD: pass
|
||||||
|
ports:
|
||||||
|
- 5436:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
postgres17:
|
||||||
|
image: postgres:17
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: test
|
||||||
|
POSTGRES_PASSWORD: pass
|
||||||
|
ports:
|
||||||
|
- 5437:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
gremlin-server:
|
gremlin-server:
|
||||||
image: entgo/gremlin-server
|
image: entgo/gremlin-server
|
||||||
ports:
|
ports:
|
||||||
@@ -419,6 +443,30 @@ jobs:
|
|||||||
--health-interval 10s
|
--health-interval 10s
|
||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 5
|
--health-retries 5
|
||||||
|
postgres16:
|
||||||
|
image: postgres:16
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: test
|
||||||
|
POSTGRES_PASSWORD: pass
|
||||||
|
ports:
|
||||||
|
- 5436:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
|
postgres17:
|
||||||
|
image: postgres:17
|
||||||
|
env:
|
||||||
|
POSTGRES_DB: test
|
||||||
|
POSTGRES_PASSWORD: pass
|
||||||
|
ports:
|
||||||
|
- 5437:5432
|
||||||
|
options: >-
|
||||||
|
--health-cmd pg_isready
|
||||||
|
--health-interval 10s
|
||||||
|
--health-timeout 5s
|
||||||
|
--health-retries 5
|
||||||
gremlin-server:
|
gremlin-server:
|
||||||
image: entgo/gremlin-server
|
image: entgo/gremlin-server
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -138,6 +138,28 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 5435:5432
|
- 5435:5432
|
||||||
|
|
||||||
|
postgres16:
|
||||||
|
platform: linux/amd64
|
||||||
|
image: postgres:16
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: test
|
||||||
|
POSTGRES_PASSWORD: pass
|
||||||
|
healthcheck:
|
||||||
|
test: pg_isready -U postgres
|
||||||
|
ports:
|
||||||
|
- 5436:5432
|
||||||
|
|
||||||
|
postgres17:
|
||||||
|
platform: linux/amd64
|
||||||
|
image: postgres:16
|
||||||
|
environment:
|
||||||
|
POSTGRES_DB: test
|
||||||
|
POSTGRES_PASSWORD: pass
|
||||||
|
healthcheck:
|
||||||
|
test: pg_isready -U postgres
|
||||||
|
ports:
|
||||||
|
- 5437:5432
|
||||||
|
|
||||||
gremlin:
|
gremlin:
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
image: entgo/gremlin-server
|
image: entgo/gremlin-server
|
||||||
|
|||||||
@@ -106,7 +106,16 @@ func TestMaria(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPostgres(t *testing.T) {
|
func TestPostgres(t *testing.T) {
|
||||||
for version, port := range map[string]int{"10": 5430, "11": 5431, "12": 5432, "13": 5433, "14": 5434, "15": 5435} {
|
for version, port := range map[string]int{
|
||||||
|
"10": 5430,
|
||||||
|
"11": 5431,
|
||||||
|
"12": 5432,
|
||||||
|
"13": 5433,
|
||||||
|
"14": 5434,
|
||||||
|
"15": 5435,
|
||||||
|
"16": 5436,
|
||||||
|
"17": 5437,
|
||||||
|
} {
|
||||||
addr := fmt.Sprintf("host=localhost port=%d user=postgres dbname=test password=pass sslmode=disable", port)
|
addr := fmt.Sprintf("host=localhost port=%d user=postgres dbname=test password=pass sslmode=disable", port)
|
||||||
t.Run(version, func(t *testing.T) {
|
t.Run(version, func(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|||||||
Reference in New Issue
Block a user