-
-
Notifications
You must be signed in to change notification settings - Fork 2
npm install test 워크플로우 구현 #656
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
Open
RiaOh
wants to merge
7
commits into
main
Choose a base branch
from
611-npm-install-test-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+85
−0
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
be51546
feat: add npm-install-test workflow
RiaOh 3bf5b04
chore: add permissions
RiaOh 9eb801e
delete: delete permissions
RiaOh 6db1ae9
chore: change node version 20 to lts
RiaOh 6931231
chore: change actions/checkout version 4 to 6
RiaOh 065a197
chore: change workflow name
RiaOh 812dc78
chore: change npm to bun & remove Next.js step
RiaOh 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 hidden or 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,85 @@ | ||
| name: NPM Install Test | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [main] | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| install-test: | ||
| if: ${{ startsWith(github.head_ref, 'release/') }} | ||
| strategy: | ||
| fail-fast: false # 하나 실패해도 나머지는 계속 돌리게 | ||
| matrix: | ||
| include: | ||
| - name: "Create React App (React 18)" | ||
| project: cra | ||
| node: "lts/*" | ||
|
|
||
| - name: "Vite + React" | ||
| project: vite | ||
| node: "lts/*" | ||
|
|
||
| runs-on: ubuntu-latest | ||
| name: ${{ matrix.name }} | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: latest | ||
|
|
||
| - name: Install dependencies & Build | ||
| run: | | ||
| bun install | ||
| bun run build | ||
|
|
||
| # ======================================== | ||
| # 테스트 프로젝트 생성 + daleui 설치 + 빌드 | ||
| # ======================================== | ||
| - name: Create test project & install daleui | ||
| run: | | ||
| mkdir /tmp/test-project && cd /tmp/test-project | ||
|
|
||
| case "${{ matrix.project }}" in | ||
| cra) | ||
| bunx --yes create-react-app@latest . --template typescript | ||
| ;; | ||
| vite) | ||
| bunx --yes create vite@5 . --template react-ts | ||
| ;; | ||
| esac | ||
|
|
||
| # 강제로 로컬 daleui 패키지 설치 | ||
| bun add "$GITHUB_WORKSPACE" | ||
|
|
||
| # ======================================== | ||
| # 실제로 daleui 써보는 smoke test 페이지 추가 | ||
| # ======================================== | ||
| - name: Add daleui smoke test | ||
| run: | | ||
| cd /tmp/test-project | ||
| mkdir -p src/smoke | ||
| cat > src/smoke/DaleTest.tsx << 'EOF' | ||
| import React from 'react'; | ||
| import { Button } from 'daleui'; | ||
|
|
||
| export default function DaleTest() { | ||
| return ( | ||
| <div data-testid="daleui-smoke"> | ||
| <Button>daleui 성공적으로 로드됨!</Button> | ||
| </div> | ||
| ); | ||
| } | ||
| EOF | ||
|
|
||
| # ======================================== | ||
| # 최종 빌드 테스트 | ||
| # ======================================== | ||
| - name: Run production build | ||
| run: | | ||
| cd /tmp/test-project | ||
| bun run build | ||
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.
디폴트라서 불필요합니다.
Uh oh!
There was an error while loading. Please reload this page.
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.
혹시나 해서 티켓 내용을 보니 이벤트가 잘못 설정되어 있네요. 현재 설정은 base 브랜치가 main으로 잡고 PR을 생성/재성성/변경 때 마다 워크플로우가 실행됩니다. 요구사항대로 구현하려면 push 이벤트를 사용해서 워크플로우 실행 시점을 잡아야할 것 같습니다.
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.
@DaleSeo 님,
이 코드가 추가되어있어 "release/x.y.z" 에서 main브랜치로 PR생성/커밋 추가 등 업데이트/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.
옷, 이 부분 아직 반영이 안 된 것 같네요.