Skip to content

Commit

Permalink
[fix] ci yml 파일 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Dongjin0224 committed Dec 17, 2024
1 parent 748f24e commit 6e44c66
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/pr-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ jobs:

# - name: Gradle로 프로젝트 Build
# run: ./gradlew build
- name: Gradle 캐시 삭제
run: rm -rf ~/.gradle/caches

- name: Gradle로 프로젝트 Build 및 Test
run: ./gradlew build -Dspring.profiles.active=test
run: ./gradlew build -Dspring.profiles.active=test --info

- name: 테스트 결과를 PR 코멘트로 출력
uses: EnricoMi/publish-unit-test-result-action@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
import org.programmers.signalbuddy.domain.crossroad.repository.CrossroadRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase;
import org.springframework.boot.test.autoconfigure.jdbc.AutoConfigureTestDatabase.Replace;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.context.ActiveProfiles;

@ActiveProfiles("test")
@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.ANY)
@AutoConfigureTestDatabase(replace = Replace.NONE)
@DataJpaTest
class CrossroadSaveTest {

Expand Down
7 changes: 3 additions & 4 deletions src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
spring:
datasource:
driver-class-name: org.h2.Driver
url: jdbc:h2:mem/testdb;MODE=MYSQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=TRUE
url: jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1
username: sa
password:

jpa:
show-sql: true
hibernate:
ddl-auto: create-drop
show-sql: true
properties:
hibernate:
format_sql: true
dialect: org.hibernate.dialect.H2Dialect
defer-datasource-initialization: true
database: h2
defer-datasource-initialization: true

0 comments on commit 6e44c66

Please sign in to comment.