Skip to content

Commit

Permalink
Merge pull request #264 from HabitPay/chore/pr-생성-시-빌드-테스트-github-act…
Browse files Browse the repository at this point in the history
…ions-추가#263

chore: CI GitHub Actions 추가 #263
  • Loading branch information
Han-Joon-Hyeok authored Oct 8, 2024
2 parents c6a728b + 86982fc commit 8ee15af
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Java CI with Gradle

on:
workflow_dispatch:
pull_request:
branches:
- "main"

jobs:
build-spring:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout backend
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
cache: "gradle"

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build with Gradle Wrapper
run: ./gradlew build
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@
import org.springframework.data.domain.SliceImpl;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.restdocs.payload.JsonFieldType;
import org.springframework.test.web.servlet.ResultActions;

import java.time.LocalDateTime;
import java.util.List;

import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.BDDMockito.given;
import static org.mockito.Mockito.*;
import static org.mockito.Mockito.any;
import static org.springframework.restdocs.headers.HeaderDocumentation.headerWithName;
import static org.springframework.restdocs.headers.HeaderDocumentation.requestHeaders;
import static org.springframework.restdocs.mockmvc.MockMvcRestDocumentation.document;
Expand Down Expand Up @@ -151,7 +150,7 @@ void findChallengePosts() throws Exception {
.build());

Slice<PostViewResponse> mockPostViewResponseSlice = new SliceImpl<>(
mockPostViewResponseList, PageRequest.of(0 ,10), true
mockPostViewResponseList, PageRequest.of(0, 10), true
);

given(challengePostSearchService.findPostViewListByChallengeId(anyLong(), any(Pageable.class)))
Expand Down Expand Up @@ -468,7 +467,7 @@ void patchPost() throws Exception {
fieldWithPath("modifiedPhotos[].photoId").description("정렬 순서를 변경하려는 이미지 파일의 PostPhotoId"),
fieldWithPath("modifiedPhotos[].viewOrder").description("변경하려는 정렬 순서"),
fieldWithPath("deletedPhotoIds").description("삭제할 이미지 파일 PostPhotoId List<Long>")
),
),
responseFields(
fieldWithPath("message").description("메시지"),
fieldWithPath("data").description("AWS S3 업로드를 위한 preSignedUrl List<String>")
Expand Down

0 comments on commit 8ee15af

Please sign in to comment.