From e69a63be1fa211e3229668e1effd18d45b305dcf Mon Sep 17 00:00:00 2001 From: durumi99 Date: Mon, 19 Jan 2026 21:41:56 +0900 Subject: [PATCH] =?UTF-8?q?[ci]=20CI=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=20=EC=B6=94=EA=B0=80=20=EB=B0=8F=20ESLint,?= =?UTF-8?q?=20Prettier=20=ED=8F=AC=EB=A7=B7=ED=8C=85=20=EC=B2=B4=ED=81=AC?= =?UTF-8?q?=20=EB=8B=A8=EA=B3=84=20=ED=8F=AC=ED=95=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ .github/workflows/static.yml | 2 +- package.json | 2 ++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..7a95faa8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + pull_request: + branches: ['main', 'develop'] + push: + branches: ['develop'] + +jobs: + lint-and-format: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.20.5' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run ESLint + run: npm run lint + + - name: Check Prettier formatting + run: npx prettier --check "src/**/*.{ts,tsx,js,jsx,json,css}" + + - name: Type check + run: npx tsc --noEmit diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index e6e879a6..97bab53a 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -34,7 +34,7 @@ jobs: cache: 'npm' - name: Install dependencies - run: npm install + run: npm ci - name: Build the project run: npm run build diff --git a/package.json b/package.json index 60e165a1..fd31f166 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ "dev": "vite --host", "build": "tsc -b && vite build", "lint": "eslint .", + "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css}\"", + "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css}\"", "preview": "vite preview", "predeploy": "npm run build", "deploy": "gh-pages -d build",