Skip to content

Commit 68134b1

Browse files
authored
[CTM-44] Use Postgres 17 in build-and-test action (#303)
* Use Postgres 17 in build-and-test action * Create db with owner * Use postgres version 17.7 in tests * Update local run_postgres.sh version * Fix perf test error * Update build-and-test action
1 parent 1b548e7 commit 68134b1

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585

8686
services:
8787
postgres:
88-
image: postgres:13
88+
image: postgres:17.7
8989
env:
9090
POSTGRES_PASSWORD: postgres
9191
ports: [ "5432:5432" ]
@@ -133,7 +133,7 @@ jobs:
133133

134134
services:
135135
postgres:
136-
image: postgres:13
136+
image: postgres:17.7
137137
env:
138138
POSTGRES_PASSWORD: postgres
139139
ports: [ "5432:5432" ]

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Government data.
1212

1313
### Prerequisites:
1414

15-
- Install Postgres 13: https://www.postgresql.org/download/
15+
- Install Postgres 17.7: https://www.postgresql.org/download/
1616
- [The app](https://postgresapp.com/downloads.html) may be easier, just make sure to download the right version. It'll manage things for you and has a useful menulet where the server can be turned on and off. Don't forget to create a server if you go this route.
1717
- Install Adoptium Java 17 (Temurin). Here's an easy way on Mac, using [jEnv](https://www.jenv.be/) to manage the active version:
1818

common/postgres-init.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
CREATE DATABASE ecm;
2-
CREATE DATABASE ecm_test;
31
CREATE ROLE ecmuser WITH LOGIN ENCRYPTED PASSWORD 'ecmpwd';
2+
CREATE DATABASE ecm OWNER ecmuser;
3+
CREATE DATABASE ecm_test OWNER ecmuser;

integration/src/main/resources/datageneration/regenerate_perf_data.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ AS $$
1616
VALUES (
1717
nextval('linked_account_id_seq'),
1818
user_id,
19-
'RAS'::provider,
19+
'RAS'::provider_enum,
2020
'testToken',
2121
current_timestamp + interval '3000 year',
2222
external_user_id,

local-dev/run_postgres.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# Start up a postgres container with initial user/database setup.
3-
POSTGRES_VERSION=14
3+
POSTGRES_VERSION=17.7
44

55
start() {
66
echo "attempting to remove old $CONTAINER container..."
@@ -9,7 +9,7 @@ start() {
99
# start up postgres
1010
echo "starting up postgres container..."
1111
BASEDIR=$(dirname "$0")
12-
docker create --name $CONTAINER --rm -e POSTGRES_PASSWORD=password -p "$POSTGRES_PORT:5432" postgres:$POSTGRES_VERSION -c listen_addresses='*'
12+
docker create --name $CONTAINER --rm -e POSTGRES_PASSWORD=password -p "$POSTGRES_PORT:5432" postgres:${POSTGRES_VERSION} -c listen_addresses='*'
1313
docker cp $BASEDIR/../common/postgres-init.sql $CONTAINER:/docker-entrypoint-initdb.d/docker_postgres_init.sql
1414
docker start $CONTAINER
1515

0 commit comments

Comments
 (0)