Skip to content

Commit 57747c5

Browse files
feat(spring-databases-example): move files and modules
1 parent c992695 commit 57747c5

File tree

52 files changed

+242
-219
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+242
-219
lines changed

.github/workflows/spring-databases-mysql-example.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/spring-databases-oracle-example.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/spring-databases-postgres-example.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: spring-mysql-example CI Build
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
paths:
7+
- "spring-mysql-example/**"
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
13+
jobs:
14+
15+
integration-tests:
16+
name: Run Unit & Integration Tests
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: spring-mysql-example
21+
strategy:
22+
matrix:
23+
distribution: [ 'temurin' ]
24+
java: [ '21' ]
25+
steps:
26+
- uses: actions/checkout@v5
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Set up JDK ${{ matrix.java }}
31+
uses: actions/[email protected]
32+
with:
33+
java-version: ${{ matrix.java }}
34+
distribution: ${{ matrix.distribution }}
35+
cache: 'maven'
36+
- name: Build and analyze
37+
run: ./mvnw clean verify
38+
39+
health-check:
40+
name: Health Check on Services
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout repository and submodules
44+
uses: actions/checkout@v5
45+
with:
46+
submodules: true
47+
48+
- name: Extract service names from docker compose
49+
id: services
50+
run: |
51+
echo "services<<EOF" >> $GITHUB_OUTPUT
52+
docker compose -f ./spring-mysql-example/compose.yaml config --services >> $GITHUB_OUTPUT
53+
echo "EOF" >> $GITHUB_OUTPUT
54+
55+
- name: Start containers with Compose Action
56+
uses: hoverkraft-tech/[email protected]
57+
with:
58+
compose-file: './spring-mysql-example/compose.yaml'
59+
services: ${{ steps.services.outputs.services }}
60+
up-flags: '--build'
61+
down-flags: '--volumes'
62+
63+
- name: Wait for containers to initialize
64+
run: sleep 30
65+
66+
- name: Check container health
67+
run: |
68+
./.github/scripts/check-container-health.sh "${{ steps.services.outputs.services }}"
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: spring-postgres-example CI Build
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
paths:
7+
- "spring-postgres-example/**"
8+
types:
9+
- opened
10+
- synchronize
11+
- reopened
12+
13+
jobs:
14+
15+
integration-tests:
16+
name: Run Unit & Integration Tests
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: spring-postgres-example
21+
strategy:
22+
matrix:
23+
distribution: [ 'temurin' ]
24+
java: [ '21' ]
25+
steps:
26+
- uses: actions/checkout@v5
27+
with:
28+
fetch-depth: 0
29+
30+
- name: Set up JDK ${{ matrix.java }}
31+
uses: actions/[email protected]
32+
with:
33+
java-version: ${{ matrix.java }}
34+
distribution: ${{ matrix.distribution }}
35+
cache: 'maven'
36+
- name: Build and analyze
37+
run: ./mvnw clean verify
38+
39+
health-check:
40+
name: Health Check on Services
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout repository and submodules
44+
uses: actions/checkout@v5
45+
with:
46+
submodules: true
47+
48+
- name: Extract service names from docker compose
49+
id: services
50+
run: |
51+
echo "services<<EOF" >> $GITHUB_OUTPUT
52+
docker compose -f ./spring-postgres-example/compose.yaml config --services >> $GITHUB_OUTPUT
53+
echo "EOF" >> $GITHUB_OUTPUT
54+
55+
- name: Start containers with Compose Action
56+
uses: hoverkraft-tech/[email protected]
57+
with:
58+
compose-file: './spring-postgres-example/compose.yaml'
59+
services: ${{ steps.services.outputs.services }}
60+
up-flags: '--build'
61+
down-flags: '--volumes'
62+
63+
- name: Wait for containers to initialize
64+
run: sleep 30
65+
66+
- name: Check container health
67+
run: |
68+
./.github/scripts/check-container-health.sh "${{ steps.services.outputs.services }}"

pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
<module>spring-keycloak-example</module>
1818
<module>spring-jasper-example</module>
1919
<module>spring-multimodule-example</module>
20-
<module>spring-databases-example</module>
20+
<module>spring-mysql-example</module>
21+
<module>spring-postgres-example</module>
22+
<module>spring-oracle-example</module>
2123
</modules>
2224

2325
</project>

spring-databases-example/oracle-example/target/classes/application-default.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

spring-databases-example/oracle-example/target/classes/application-prd.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

spring-databases-example/pom.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)