From 580e51f576ecdb9e06b2331efcb80f64f475857d Mon Sep 17 00:00:00 2001 From: d-kimsuon Date: Sun, 7 Sep 2025 16:27:06 +0900 Subject: [PATCH 1/2] feat: add comprehensive CI workflow for quality checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add GitHub Actions workflow for automated testing - Include lint, typecheck, test, and build validation - Support Node.js 20.12.0+ with matrix strategy - Use pnpm 10.8.1 with dependency caching - Verify CLI binary creation in build step 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e4906bd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + name: Quality Checks + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ['20.12.0', '22'] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10.8.1 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run linting + run: pnpm lint + + - name: Run type checking + run: pnpm typecheck + + - name: Run tests + run: pnpm test + + - name: Build project + run: pnpm build + + - name: Verify build artifacts + run: | + if [ ! -f "dist/index.js" ]; then + echo "Build failed: dist/index.js not found" + exit 1 + fi + echo "Build successful: dist/index.js created" \ No newline at end of file From 70d39a2d149551dd529b07ef31490f647bd6a63d Mon Sep 17 00:00:00 2001 From: d-kimsuon Date: Sun, 7 Sep 2025 18:09:25 +0900 Subject: [PATCH 2/2] ci: fix workflow --- .github/workflows/ci.yml | 28 ++++++++++------------------ .node-version | 2 +- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4906bd..d588c83 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,17 +2,20 @@ name: CI on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] + types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: name: Quality Checks runs-on: ubuntu-latest - strategy: - matrix: - node-version: ['20.12.0', '22'] + timeout-minutes: 15 steps: - name: Checkout code @@ -23,10 +26,10 @@ jobs: with: version: 10.8.1 - - name: Setup Node.js ${{ matrix.node-version }} + - name: Setup Node.js 20.12.0 uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 20.12.0 cache: 'pnpm' - name: Install dependencies @@ -38,16 +41,5 @@ jobs: - name: Run type checking run: pnpm typecheck - - name: Run tests - run: pnpm test - - name: Build project run: pnpm build - - - name: Verify build artifacts - run: | - if [ ! -f "dist/index.js" ]; then - echo "Build failed: dist/index.js not found" - exit 1 - fi - echo "Build successful: dist/index.js created" \ No newline at end of file diff --git a/.node-version b/.node-version index 9d11232..2b9cabc 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -24.4.1 +20.12.0