Skip to content

Commit 3da7e0c

Browse files
authored
Merge pull request #219 from Runnect/ci/prod-ci-use-local-db-containers
fix: prod CIκ°€ μž„μ‹œ DB μ»¨ν…Œμ΄λ„ˆλ₯Ό 쓰도둝 μˆ˜μ • (ν…ŒμŠ€νŠΈ μ‹€ν–‰ 포함)
2 parents 24a1d8a + 20f2302 commit 3da7e0c

1 file changed

Lines changed: 32 additions & 1 deletion

File tree

β€Ž.github/workflows/prod-ci.ymlβ€Ž

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,32 @@ jobs:
1212

1313
runs-on: ubuntu-latest
1414

15+
# ν…ŒμŠ€νŠΈ(contextLoads λ“±)λŠ” μ‹€μ œ prod DB/Redisκ°€ μ•„λ‹ˆλΌ CI μ•ˆμ—μ„œ λ„μš°λŠ”
16+
# μž„μ‹œ μ»¨ν…Œμ΄λ„ˆλ₯Ό λ°”λΌλ³΄κ²Œ ν•œλ‹€ (원격 prod ν™˜κ²½μ— 직접 μ˜μ‘΄ν•˜μ§€ μ•Šλ„λ‘).
17+
services:
18+
postgres:
19+
image: postgres:15
20+
env:
21+
POSTGRES_DB: runnect
22+
POSTGRES_USER: runnect
23+
POSTGRES_PASSWORD: runnect_local_password
24+
ports:
25+
- 5432:5432
26+
options: >-
27+
--health-cmd pg_isready
28+
--health-interval 10s
29+
--health-timeout 5s
30+
--health-retries 5
31+
redis:
32+
image: redis:7
33+
ports:
34+
- 6379:6379
35+
options: >-
36+
--health-cmd "redis-cli ping"
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 5
40+
1541
steps:
1642
- uses: actions/checkout@v3
1743
- name: Set up JDK 11
@@ -42,4 +68,9 @@ jobs:
4268
run: chmod +x gradlew
4369

4470
- name: Build with Gradle
45-
run: ./gradlew build -x test
71+
run: ./gradlew build
72+
env:
73+
SPRING_DATASOURCE_URL: jdbc:postgresql://localhost:5432/runnect
74+
SPRING_DATASOURCE_USERNAME: runnect
75+
SPRING_DATASOURCE_PASSWORD: runnect_local_password
76+
SPRING_DATA_REDIS_HOST: localhost

0 commit comments

Comments
Β (0)