mirror of
https://github.com/jackc/pgx.git
synced 2025-04-28 22:10:31 +00:00
Add CockroachDB to CI
This commit is contained in:
parent
1e905d8e38
commit
0d307bcc5e
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -10,12 +10,12 @@ jobs:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-18.04
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
go-version: [1.15, 1.16]
|
go-version: [1.15, 1.16]
|
||||||
pg-version: [9.6, 10, 11, 12, 13]
|
pg-version: [9.6, 10, 11, 12, 13, cockroachdb]
|
||||||
include:
|
include:
|
||||||
- pg-version: 9.6
|
- pg-version: 9.6
|
||||||
pgx-test-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
|
pgx-test-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
|
||||||
@ -52,6 +52,8 @@ jobs:
|
|||||||
pgx-test-tls-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test?sslmode=require
|
pgx-test-tls-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test?sslmode=require
|
||||||
pgx-test-md5-password-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
|
pgx-test-md5-password-conn-string: postgres://pgx_md5:secret@127.0.0.1/pgx_test
|
||||||
pgx-test-plain-password-conn-string: postgres://pgx_pw:secret@127.0.0.1/pgx_test
|
pgx-test-plain-password-conn-string: postgres://pgx_pw:secret@127.0.0.1/pgx_test
|
||||||
|
- pg-version: cockroachdb
|
||||||
|
pgx-test-conn-string: "postgresql://root@127.0.0.1:26257/pgx_test?sslmode=disable&experimental_enable_temp_tables=on"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eux
|
set -eux
|
||||||
|
|
||||||
if [ "${PGVERSION-}" != "" ]
|
if [[ "${PGVERSION-}" =~ ^[0-9.]+$ ]]
|
||||||
then
|
then
|
||||||
sudo apt-get remove -y --purge postgresql libpq-dev libpq5 postgresql-client-common postgresql-common
|
sudo apt-get remove -y --purge postgresql libpq-dev libpq5 postgresql-client-common postgresql-common
|
||||||
sudo rm -rf /var/lib/postgresql
|
sudo rm -rf /var/lib/postgresql
|
||||||
@ -38,6 +38,14 @@ then
|
|||||||
psql -U postgres -c "create user \" tricky, ' } \"\" \\ test user \" superuser password 'secret'"
|
psql -U postgres -c "create user \" tricky, ' } \"\" \\ test user \" superuser password 'secret'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${PGVERSION-}" =~ ^cockroach ]]
|
||||||
|
then
|
||||||
|
wget -qO- https://binaries.cockroachdb.com/cockroach-v20.2.5.linux-amd64.tgz | tar xvz
|
||||||
|
sudo mv cockroach-v20.2.5.linux-amd64/cockroach /usr/local/bin/
|
||||||
|
cockroach start-single-node --insecure --background --listen-addr=localhost
|
||||||
|
cockroach sql --insecure -e 'create database pgx_test'
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${CRATEVERSION-}" != "" ]
|
if [ "${CRATEVERSION-}" != "" ]
|
||||||
then
|
then
|
||||||
docker run \
|
docker run \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user