Skip to content

Commit 1fbe87e

Browse files
committed
fix
1 parent edb205e commit 1fbe87e

File tree

3 files changed

+60
-33
lines changed

3 files changed

+60
-33
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -49,39 +49,6 @@ jobs:
4949
# 'native-sql-example' doesn't run on MySQL because it has native queries
5050
- example: 'native-sql-example'
5151
db: 'MySQL'
52-
services:
53-
# Label used to access the service container
54-
mysql:
55-
# Docker Hub image
56-
image: mysql:9.2.0
57-
env:
58-
MYSQL_ROOT_PASSWORD: hreact
59-
MYSQL_DATABASE: hreact
60-
MYSQL_USER: hreact
61-
MYSQL_PASSWORD: hreact
62-
# Set health checks to wait until postgres has started
63-
options: >-
64-
--health-cmd="mysqladmin ping"
65-
--health-interval 10s
66-
--health-timeout 5s
67-
--health-retries 5
68-
ports:
69-
- 3306:3306
70-
postgres:
71-
# Docker Hub image
72-
image: postgres:17.4
73-
env:
74-
POSTGRES_DB: hreact
75-
POSTGRES_USER: hreact
76-
POSTGRES_PASSWORD: hreact
77-
# Set health checks to wait until postgres has started
78-
options: >-
79-
--health-cmd pg_isready
80-
--health-interval 10s
81-
--health-timeout 5s
82-
--health-retries 5
83-
ports:
84-
- 5432:5432
8552
steps:
8653
- name: Checkout ${{ inputs.branch }}
8754
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -114,6 +81,18 @@ jobs:
11481
with:
11582
distribution: 'temurin'
11683
java-version: 17
84+
- name: Start MySQL database with Docker Compose
85+
if: matrix.db == 'MySQL'
86+
uses: isbang/[email protected]
87+
with:
88+
compose-file: tooling/docker/docker-compose-mysql.yml
89+
up-flags: '--detach'
90+
- name: Start PostgreSQL database with Docker Compose
91+
if: matrix.db == 'PostgreSQL'
92+
uses: isbang/[email protected]
93+
with:
94+
compose-file: tooling/docker/docker-compose-postgresql.yml
95+
up-flags: '--detach'
11796
- name: Print the effective ORM version used
11897
run: ./gradlew :${{ matrix.example }}:dependencyInsight --dependency org.hibernate.orm:hibernate-core
11998
- name: Run examples in '${{ matrix.example }}' on ${{ matrix.db }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: '3.8'
2+
3+
services:
4+
mysql:
5+
image: docker.io/mysql:9.2.0
6+
container_name: hibernate-reactive-mysql
7+
environment:
8+
MYSQL_DATABASE: hreact
9+
MYSQL_USER: hreact
10+
MYSQL_PASSWORD: hreact
11+
MYSQL_ROOT_PASSWORD: hreact
12+
ports:
13+
- "3306:3306"
14+
volumes:
15+
- mysql_data:/var/lib/mysql
16+
restart: unless-stopped
17+
healthcheck:
18+
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "hreact", "-phreact"]
19+
interval: 10s
20+
timeout: 5s
21+
retries: 5
22+
command: --default-authentication-plugin=mysql_native_password
23+
24+
volumes:
25+
mysql_data:
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: '3.8'
2+
3+
services:
4+
postgresql:
5+
image: docker.io/postgres:17.5
6+
container_name: hibernate-reactive-postgresql
7+
environment:
8+
POSTGRES_DB: hreact
9+
POSTGRES_USER: hreact
10+
POSTGRES_PASSWORD: hreact
11+
ports:
12+
- "5432:5432"
13+
volumes:
14+
- postgresql_data:/var/lib/postgresql/data
15+
restart: unless-stopped
16+
healthcheck:
17+
test: ["CMD-SHELL", "pg_isready -U hreact -d hreact"]
18+
interval: 10s
19+
timeout: 5s
20+
retries: 5
21+
22+
volumes:
23+
postgresql_data:

0 commit comments

Comments
 (0)