Skip to content

Commit d1c099d

Browse files
committed
Added PostgreSQL to CI pipeline (rrobetti#1)
* Added PostgreSQL to CI pipeline * fix: postgres health-cmd * fix: moved postgre to services
1 parent 00da83d commit d1c099d

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
1414

15+
services:
16+
postgres:
17+
image: postgres:15
18+
env:
19+
POSTGRES_USER: testuser
20+
POSTGRES_PASSWORD: testpassword
21+
POSTGRES_DB: defaultdb
22+
options: >-
23+
--health-cmd pg_isready
24+
--health-interval 10s
25+
--health-timeout 5s
26+
--health-retries 5
27+
ports:
28+
- 5432:5432
29+
1530
steps:
1631
- name: Git checkout
1732
uses: actions/checkout@v4
@@ -32,4 +47,4 @@ jobs:
3247
run: mvn verify -pl ojp-server -Prun-ojp-server > ojp-server.log 2>&1 &
3348

3449
- name: Run tests
35-
run: mvn test -DdisablePostgresTests
50+
run: mvn test
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
org.openjdbcproxy.jdbc.Driver,jdbc:ojp[localhost:1059]_h2:~/test,sa,
2-
org.openjdbcproxy.jdbc.Driver,jdbc:ojp[localhost:1059]_postgresql://:25060/defaultdb?sslmode=require,,
2+
org.openjdbcproxy.jdbc.Driver,jdbc:ojp[localhost:1059]_postgresql://:5432/defaultdb,testuser,testpassword
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
org.openjdbcproxy.jdbc.Driver,jdbc:ojp[localhost:1059]_postgresql://:25060/defaultdb?sslmode=require,,
1+
org.openjdbcproxy.jdbc.Driver,jdbc:ojp[localhost:1059]_postgresql://:5432/defaultdb,testuser,testpassword

0 commit comments

Comments
 (0)