-
Notifications
You must be signed in to change notification settings - Fork 1
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
[ Docs ] Lint, Build, Assign Reviewer Workflow 생성 #13
Merged
Merged
Changes from 19 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
4b7856d
docs: assign reviewer, build workflow 생성
wuzoo 3b022ef
chore: merge main
wuzoo e6bb628
docs: lint step 추가
wuzoo 735f07c
chore: merge main
wuzoo b346630
chore: yml file name change
wuzoo 1d8e915
docs: cache pnpm 삭제
wuzoo 2e49802
chore: 모든 Page 임시 템플릿 생성
wuzoo fea341d
docs: artifact path 수정
wuzoo 91e1e7e
docs: artifact path: next
wuzoo 6c0b7ec
docs: artifact path: .next
wuzoo a016758
docs: target branch 제거
wuzoo 97ebc85
chore: biome lint workflow test
wuzoo 29431ed
docs: run biome ci for ci environment
wuzoo 6dc4840
chore: console.log 삭제
wuzoo 96e9b9d
docs: biome ci formatter disabled test
wuzoo 6508154
docs: lint error return test
wuzoo 50da3a4
chore: biome test 코드 삭제
wuzoo 6070d94
chore: merge main
wuzoo c2a184d
chore: noBarrelFile, noReExportAll off
wuzoo 68ed49b
docs: type check by tsc + seperate cd pipeline
wuzoo b7f4e9c
docs: concurrently check 생성하여 workflow 반영
wuzoo 037b861
docs: name 수정
wuzoo ae3e778
chore: merge main
wuzoo d4b8778
fix: biome lint error resolve
wuzoo cdcecdd
docs: pnpm lock file update
wuzoo a713e61
chore: check script ci로 수정하고 biome ignore 추가
wuzoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Set to true to add reviewers to pull requests | ||
addReviewers: true | ||
|
||
# Set to true to add assignees to pull requests | ||
addAssignees: author | ||
|
||
# A list of reviewers to be added to pull requests (GitHub user name) | ||
reviewers: | ||
- HwangDo | ||
- Lee jin | ||
- ptyoiy | ||
- wuzoo | ||
|
||
# A number of reviewers added to the pull request | ||
# Set 0 to add all the reviewers (default: 0) | ||
numberOfReviewers: 0 | ||
# A list of assignees, overrides reviewers if set | ||
# assignees: | ||
# - assigneeA | ||
|
||
# A number of assignees to add to the pull request | ||
# Set to 0 to add all of the assignees. | ||
# Uses numberOfReviewers if unset. | ||
# numberOfAssignees: 2 | ||
|
||
# A list of keywords to be skipped the process that add reviewers if pull requests include it | ||
# skipKeywords: | ||
# - wip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Assign Reviewer | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, ready_for_review] | ||
|
||
jobs: | ||
assign_reviewer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: kentaro-m/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build Next JS | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
|
||
- name: Setup Pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
version: 9 | ||
|
||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Lint Check | ||
run: pnpm biome ci --formatter-enabled=false | ||
|
||
- name: Restore cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.next/cache | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
restore-keys: | | ||
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml') }}- | ||
|
||
- name: Build with Next.js | ||
run: pnpm build | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
name: build-app | ||
path: .next | ||
wuzoo marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
[P4]
저는 CI에서 실제 Production 빌드 및 아티팩트 업로드까지 이루어지면 안된다고 생각합니다.
책임의 분리 관점인데요, CI 레벨에서 정말 필요한 체크는 네 가지라고 생각합니다.
위 네가지는 Production 빌드를 하지 않아도 검사가 가능한 부분이고, 통합테스트가 필요한 부분이 아닙니다.
또한 CI 파이프라인의 메인 사용처는 이런 PR입니다. 아티팩트는 업로드하면 버저닝으로 기록이 계속해서 남습니다. 업로드된 아티팩트를 시간순으로 볼 수 있고, 별도로 다운로드도 가능한데요, 이렇게 CI마다 모두 빌드 및 아티팩트 업로드를 반복하면 배포 단위, feature단위로 아티팩트가 나오지 않고 각종 PR의 trivial한 커밋에 대해서도 모두 히스토리가 생겨버려 아티팩트 관리가 어려워집니다.
결론은 컴파일 검사는 tsc로 하고, restore 캐시와 빌드 및 업로드는 CD 파이프라인의 책임이 맞다고 생각합니다.
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 CD 파이프라인을 구축하는데 있어서도 이런 사소한 부분들이 정말 중요하다는 걸 다시금 깨닫고 가네요 ! 지금까지 워크플로우를 작성할 때, 항상 ci cd를 같은 부분에서 작성하곤 했는데, 황조님이 말씀하신 것처럼 불필요한 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.
추가적으로 그렇다면 cd 파이프라인에 해당하는 부분은
deploy
브랜치에 pr 이 트리거되었을 때로 yml 파일을 따로 작성해서 생성해두면 될까요 ??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.
배포하려면 제가 갖고있는 AWS에 접근해야하고, secrets들도 설정해야 하는 부분이라 CD yml은 제가 작성하겠습니다 :D
캐시쪽부터 아티팩트까지 잘 작성해주셔서 그대로 가져다 써도 될 것 같아요