@@ -27,7 +27,10 @@ local debian_pipeline(name,
27
27
image,
28
28
arch='amd64' ,
29
29
deps=default_deps,
30
+ before_pytest=[],
31
+ pytest_opts='' ,
30
32
extra_cmds=[],
33
+ services=[],
31
34
allow_fail=false ) = {
32
35
kind: 'pipeline' ,
33
36
type: 'docker' ,
@@ -51,11 +54,13 @@ local debian_pipeline(name,
51
54
'eatmydata ' + apt_get_quiet + ' update' ,
52
55
'eatmydata ' + apt_get_quiet + ' dist-upgrade -y' ,
53
56
'eatmydata ' + apt_get_quiet + ' install --no-install-recommends -y ' + std.join (' ' , deps),
54
- 'PYTHONPATH=. python3 -mpytest -vv --color=yes --sql-tracing' ,
57
+ ] + before_pytest + [
58
+ 'PYTHONPATH=. python3 -mpytest -vv --color=yes --sql-tracing ' + pytest_opts,
55
59
]
56
60
+ extra_cmds,
57
61
},
58
62
],
63
+ services: services,
59
64
};
60
65
61
66
[
@@ -92,6 +97,19 @@ local debian_pipeline(name,
92
97
debian_pipeline('Ubuntu latest (amd64)' , docker_base + 'ubuntu-rolling' ),
93
98
debian_pipeline('Ubuntu LTS (amd64)' , docker_base + 'ubuntu-lts' ),
94
99
100
+ debian_pipeline(
101
+ 'PostgreSQL/bullseye' ,
102
+ docker_base + 'debian-bullseye' ,
103
+ deps=default_deps + ['python3-psycopg2' , 'postgresql-client' ],
104
+ services=[
105
+ { name: 'pg' , image: 'postgres:bullseye' , environment: { POSTGRES_USER: 'ci' , POSTGRES_PASSWORD: 'ci' } },
106
+ ],
107
+ before_pytest=[
108
+ 'for i in $(seq 0 30); do if pg_isready -d ci -h pg -U ci -t 1; then break; fi; if [ "$i" = 30 ]; then echo "Timeout waiting for postgresql" >&2; exit 1; fi; sleep 1; done' ,
109
+ ],
110
+ pytest_opts='--pgsql "postgresql://ci:ci@pg/ci"'
111
+ ),
112
+
95
113
// ARM builds (ARM64 and armhf)
96
114
debian_pipeline('Debian sid (ARM64)' , docker_base + 'debian-sid' , arch='arm64' ),
97
115
debian_pipeline('Debian stable (armhf)' , docker_base + 'debian-stable/arm32v7' , arch='arm64' ),
0 commit comments