Skip to content

Commit e8ef0e3

Browse files
authored
Test: dev PR 승인 테스트 (#7)
* Test: dev PR 승인 테스트 * Infra: BackendCI 추가 - PR 요청시 백엔드 빌드 테스트 도입
1 parent 839bfcf commit e8ef0e3

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/backendCI.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: PR Build & Test
2+
3+
# PR 이벤트 트리거 (main, dev 브랜치 대상으로)
4+
on:
5+
pull_request:
6+
branches:
7+
- main
8+
- dev
9+
types: [opened, synchronize, reopened]
10+
11+
jobs:
12+
build-and-test:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# 저장소 체크아웃
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
# Java 21 설치
21+
- name: Set up Java 21
22+
uses: actions/setup-java@v3
23+
with:
24+
distribution: 'temurin' # Eclipse Temurin JDK
25+
java-version: '21' # Gradle build.gradle toolchain에 맞춤
26+
27+
# Build (테스트 제외)
28+
- name: Build project
29+
run: ./gradlew clean build -x test
30+
31+
# Test 실행
32+
- name: Run tests
33+
run: ./gradlew test
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.back.domain.home;
2+
3+
import org.springframework.web.bind.annotation.GetMapping;
4+
import org.springframework.web.bind.annotation.RestController;
5+
6+
@RestController
7+
public class HomeController {
8+
@GetMapping("/")
9+
public String hello() {
10+
return "Hello World";
11+
}
12+
}

0 commit comments

Comments
 (0)