Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: PR Build Check

on:
pull_request:
branches: [ "main", "develop" ]

permissions:
contents: read

concurrency:
group: pr-build-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 1. 프로젝트 코드 가져오기
uses: actions/checkout@v4

- name: 2. JDK 21 환경 세팅
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: 3. Gradle 세팅 (캐시)
uses: gradle/actions/setup-gradle@v4

- name: 4. 빌드 및 테스트
run: |
chmod +x gradlew
./gradlew build

- name: 5. 실패 시 테스트 리포트 업로드
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-report
path: build/reports/tests/test
retention-days: 7
2 changes: 2 additions & 0 deletions src/test/java/com/humix/api/ApiApplicationTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ActiveProfiles;

@SpringBootTest
@ActiveProfiles("test")
class ApiApplicationTests {

@Test
Expand Down
31 changes: 31 additions & 0 deletions src/test/resources/application-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
spring:
datasource:
url: jdbc:h2:mem:humix;MODE=MariaDB;DATABASE_TO_LOWER=TRUE;DB_CLOSE_DELAY=-1
driver-class-name: org.h2.Driver
username: sa
password:
jpa:
hibernate:
ddl-auto: create-drop

jwt:
token:
secret-key: test-secret-key-for-h2-context-load-only-0123456789abcdef
expiration:
access: 1800000
refresh: 604800000
cookie:
secure: false
same-site: Lax

cloud:
aws:
credentials:
access-key: test
secret-key: test
s3:
bucket: test-bucket
region:
static: ap-northeast-2
stack:
auto: false
Loading