Skip to content

Commit 7ba260a

Browse files
committed
ci[test]: ci 테스트의 환경변수 세팅을 테스트 성공 기점으로 롤백 이후 이메일 환경변수만 추가
1 parent c0175e5 commit 7ba260a

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

.github/workflows/CI-CD_Pipeline.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ jobs:
7575
7676
# JPA 설정 (application-test.yml에서 참조)
7777
TEST_JPA_HIBERNATE_DDL_AUTO=create-drop
78+
79+
email_address=${{ secrets.EMAIL_ADDRESS }}
80+
send_email_password=${{ secrets.EMAIL_PASSWORD }}
81+
send_email_address=${{ secrets.SEND_EMAIL_ADDRESS }}
7882
7983
# Redis 설정 (application-test.yml에서 참조, GitHub Actions 서비스 사용)
8084
TEST_REDIS_HOST=localhost

backend/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ custom:
9595
jwt:
9696
secretKey: ${CUSTOM_JWT_SECRET_KEY}
9797
accessToken:
98-
expirationSeconds: ${CUSTOM_JWT_ACCESS_TOKEN_EXPIRATION_SECONDS}
98+
expirationSeconds: ${CUSTOM_JWT_ACCESS_TOKEN_EXPIRATION_SECONDS}

backend/src/test/resources/application-test-ci.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
spring:
22
application:
3-
name: test
3+
name: test-ci
44
output:
55
ansi:
66
enabled: always
77

88
datasource:
9-
url: jdbc:h2:mem:db_test;MODE=MySQL
10-
username: sa
11-
password:
12-
driver-class-name: org.h2.Driver
9+
url: ${TEST_DATASOURCE_URL}
10+
username: ${TEST_DATASOURCE_USERNAME}
11+
password: ${TEST_DATASOURCE_PASSWORD}
12+
driver-class-name: ${TEST_DATASOURCE_DRIVER}
1313

1414
jpa:
1515
show-sql: true
1616
hibernate:
17-
ddl-auto: create-drop
17+
ddl-auto: ${TEST_JPA_HIBERNATE_DDL_AUTO}
1818
properties:
1919
hibernate:
2020
use_sql_comments: true
@@ -39,10 +39,13 @@ spring:
3939
writetimeout: 5000
4040
auth-code-expiration-millis: 1800000
4141

42-
# 로컬 환경: Embedded Redis 사용
42+
# CI/CD 환경: 실제 Redis 서비스 사용, Embedded Redis 비활성화
4343
data:
4444
redis:
45-
port: 6370 # 기본 포트와 충돌 방지
45+
host: ${TEST_REDIS_HOST:localhost}
46+
port: ${TEST_REDIS_PORT:6379}
47+
password: ${TEST_REDIS_PASSWORD:}
48+
embedded: false
4649

4750
security:
4851
oauth2:
@@ -82,6 +85,6 @@ logging:
8285

8386
custom:
8487
jwt:
85-
secretKey: test-secret-key-for-local-testing-only
88+
secretKey: ${CUSTOM_JWT_SECRET_KEY}
8689
accessToken:
87-
expirationSeconds: 3600
90+
expirationSeconds: ${CUSTOM_JWT_ACCESS_TOKEN_EXPIRATION_SECONDS}

0 commit comments

Comments
 (0)