From ec9b6186ea03189b29a1c5bf9a4ea046eab87533 Mon Sep 17 00:00:00 2001 From: toothlessdev Date: Fri, 10 May 2024 22:19:12 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20CI=20Workflow=20=ED=8C=8C=EC=9D=B4?= =?UTF-8?q?=ED=94=84=EB=9D=BC=EC=9D=B8=20=EA=B5=AC=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 46 ++++++++++++++++++++++++++++ package.json | 3 +- src/common/navigation/Pagination.tsx | 2 +- 3 files changed, 49 insertions(+), 2 deletions(-) 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..f7fb71b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: Compile & Linting + +on: + pull_request: + branches: + - dev + push: + branches: + - dev + +env: + NODE_VERSION: 20 + +jobs: + compile: + runs-on: ubuntu-latest + + steps: + - name: Install NodeJS + uses: actions/setup-node@v2 + with: + node-version: ${{env.NODE_VERSION}} + - name: Code Checkout + uses: actions/checkout@v2 + - name: Install Dependencies + run: npm ci + - name: Typescript Compile + run: npm run compile + + lint: + runs-on: ubuntu-latest + needs: compile + + steps: + - name: Install NodeJS + uses: actions/setup-node@v2 + with: + node-version: ${{env.NODE_VERSION}} + - name: Code Checkout + uses: actions/checkout@v2 + - name: Install Dependencies + run: npm ci + - name: Lint Code + run: npm run lint + - name: Format Code + run: npm run format diff --git a/package.json b/package.json index a28f436..4a1a98e 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "build": "tsc && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "format": "prettier --write '**/*.{ts,tsx}'" + "format": "prettier --write '**/*.{ts,tsx}'", + "compile": "tsc" }, "dependencies": { "@reduxjs/toolkit": "^2.2.4", diff --git a/src/common/navigation/Pagination.tsx b/src/common/navigation/Pagination.tsx index 33ce071..7a646e9 100644 --- a/src/common/navigation/Pagination.tsx +++ b/src/common/navigation/Pagination.tsx @@ -28,7 +28,7 @@ export const Pagination: React.FC = () => { return ( {"<"} - {Array.from({ length: perPage }, (v, k) => page + k).map((page) => { + {Array.from({ length: perPage }, (_, k) => page + k).map((page) => { return ( {page}