Skip to content

Commit 93272ef

Browse files
committed
Setup Postgres for the test job in Concourse
Install Postgres and create databases in the test job task before running the Gradle build.
1 parent 521f7ad commit 93272ef

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/ci/test.yml

+15
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,20 @@ run:
1616
args:
1717
- -exc
1818
- |
19+
# Install Postgres
20+
apt-get update
21+
apt-get install -y postgresql
22+
23+
# Allow access from any local client as `postgres` and other network users must provide a password
24+
cat > /etc/postgresql/*/main/pg_hba.conf <<-EOF
25+
local all postgres trust
26+
host all all 0.0.0.0/0 md5
27+
EOF
28+
29+
# Start Postgres
30+
service postgresql restart
31+
# Create databases, including the test database
32+
psql -U postgres -f sources/scripts/postgres/create-databases.sql postgres
33+
1934
cd sources
2035
gradle test

0 commit comments

Comments
 (0)