Skip to content

Commit 7b4caa0

Browse files
Copilotrvosa
andcommitted
Add PostgreSQL database service and configure jdbc.properties for tests
Co-authored-by: rvosa <106490+rvosa@users.noreply.github.com>
1 parent b4280e8 commit 7b4caa0

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,21 @@ jobs:
1717
checks: write
1818
pull-requests: write
1919

20+
services:
21+
postgres:
22+
image: postgres:12
23+
env:
24+
POSTGRES_DB: treebasedb
25+
POSTGRES_USER: treebase_user
26+
POSTGRES_PASSWORD: treebase_pass
27+
options: >-
28+
--health-cmd pg_isready
29+
--health-interval 10s
30+
--health-timeout 5s
31+
--health-retries 5
32+
ports:
33+
- 5432:5432
34+
2035
steps:
2136
- name: Checkout code
2237
uses: actions/checkout@v4
@@ -27,6 +42,16 @@ jobs:
2742
java-version: '8'
2843
distribution: 'temurin'
2944
cache: 'maven'
45+
46+
- name: Configure database properties for tests
47+
run: |
48+
cat > treebase-core/src/test/resources/jdbc.properties << EOF
49+
jdbc.driverClassName=org.postgresql.Driver
50+
jdbc.url=jdbc:postgresql://localhost:5432/treebasedb
51+
jdbc.username=treebase_user
52+
jdbc.password=treebase_pass
53+
mesquite.folder_dir=/tmp/mesquite
54+
EOF
3055
3156
- name: Build treebase-core
3257
run: mvn -B clean compile -f treebase-core/pom.xml

0 commit comments

Comments
 (0)