Skip to content
Merged
Changes from 12 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,78 @@
with:
token: ${{ secrets.CODECOV_TOKEN }}
- run: bun run build

install-test:
strategy:
fail-fast: false
matrix:
include:
- name: "Create React App (React 18)"
project: cra
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RiaOh 님, 우리 CRA 테스트는 그냥 하지 마시죠. CRA는 2022년 4월 이후로 업데이트가 전혀 없으며, React 공식 문서에서도 사라지면서 사실 상 폐기(deprecated) 수순을 밟고 있거든요. 워크플로우 로그를 보시면 high 단계 보안 취약점이 6개나 있는 걸 보면, 이 프로젝트 사실 상 제대로 유지보수가 되고 있다고 보기 어려울 것 같습니다. 2026년에는 React 생태계가 CRA에서 완전히 벗어나는 동참하는 차원에서 우리도 쓰지 말고, 사용자들도 쓰지 말라고 권장했으면 좋겠습니다.

Image

CRA 제거하면 matrix 안 써도 되서 워크플로우도 간단해지고, 1분 내에 실행이 끝날 수 있을 것입니다. 워크플로우가 이제 PR이 병합될 때가 아니라 PR에 변경이 있을 때 마다 실행이 되기 때문에 빠른 피드백을 줄 수 있어서 개발자 경험에도 도움이 될 거에요.


- name: "Vite + React"
project: vite

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:lib
# ========================================
# 테스트 프로젝트 생성 + daleui 설치
# ========================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이런 코멘트는 득보다 실이 많지 않을까요? 나중에 다른 분이 작업 내용을 수정할 때 함께 업데이트하는 것을 까먹기 쉽거든요. name 필드에서 작업 내용을 영어로 잘 나타내고 있기 때문에 불필요한 코멘트라고 생각합니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaleSeo 아하, 네엡! 알겠습니다. 코멘트들은 제거하겠습니다!

- name: Create test project & install daleui
run: |
mkdir /tmp/test-project && cd /tmp/test-project
case "${{ matrix.project }}" in
cra)
bun create react-app@latest . --template typescript
bun install
;;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

;; 이 문법도 신기하네요!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sounmind ;;는 bash의 case문법에서 각 case 블록의 끝을 표시하는 구문입니다!
yml 파일의 run 내부는 bash 스크립트로 되어있고,
cra case문은 여기까지, vite case문은 여기까지니 case문 빠져나가(break;역할)의 의미로 이렇게 각각 표시를 해주고 있습니다.
;;가 없으면 문법오류가 나기때문에 필수 구문이라고 합니다 :)
저도 이번에 작업하면서 공부하게됐네요. 감사합니다 :)

vite)
bun create vite@5 . --template react-ts
bun install
;;
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 { 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