-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat : main, dev PR시 CI 구현 #158
Changes from all commits
06f16a7
37d6f95
06bec65
8cef57a
605452d
eeaeec6
a9dce87
240008b
7708788
d9703c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | ||
|
||
name: CI Pipeline | ||
|
||
on: | ||
pull_request: | ||
branches: [ "main" ,"dev"] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
|
||
- name : Check out code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: List project files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 굳이 하는 이유가 있나요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 아 이건 디버깅과정에서 gradlew위치를 확인하기 위해 필요했었습니다! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 여기서 |
||
run: ls -l # 디렉토리 구조 확인 | ||
|
||
- name: List meerket directory files | ||
run: ls -l meerket # meerket 디렉토리 구조 확인 | ||
|
||
- name: Ensure Gradlew is Executable | ||
run: chmod +x ./meerket/gradlew # gradlew에 실행 권한 부여 | ||
|
||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
|
||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. | ||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 어떤 용도인가요?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. gradle 버전관리와 캐시활용해서 이미 다운로드해 둔 의존성(라이브러리)들을 재사용하여, 매번 의존성을 다시 받지 않도록 빌드 속도를 높이는 효과가 있다합니다! |
||
|
||
|
||
- name: Clean Build with Gradle Wrapper | ||
working-directory: ./meerket | ||
run: ./gradlew clean build -x test --no-daemon --info | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
혹시 push가 아닌 pr로 하신 이유가 있으실까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 코드는 CI (빌드->테스트 )까지만 자동화하는거라 main에대해 PR을 날리면 push되기전에 검증하는 로직입니다.
검증 이후 저희 승인을 하고 머지가되면 push가되고 그후에 CD에대한 코드가 작동하고 배포가 되는 flow로 생각하였습니다