From f9c096165cf9b43e269d4432be10dbda6da61554 Mon Sep 17 00:00:00 2001 From: DongjaJ Date: Sat, 11 Jan 2025 03:44:15 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20ci=20workflow=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/pnpm-setup-node/action.yml | 11 +++++++ .github/ci.yml | 36 ++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/actions/pnpm-setup-node/action.yml create mode 100644 .github/ci.yml diff --git a/.github/actions/pnpm-setup-node/action.yml b/.github/actions/pnpm-setup-node/action.yml new file mode 100644 index 0000000..b271f29 --- /dev/null +++ b/.github/actions/pnpm-setup-node/action.yml @@ -0,0 +1,11 @@ +name: setup pnpm & node +description: setup pnpm & node +runs: + using: composite + steps: + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + cache: 'pnpm' + cache-dependency-path: 'pnpm-lock.yaml' + node-version-file: '.nvmrc' diff --git a/.github/ci.yml b/.github/ci.yml new file mode 100644 index 0000000..ebf067f --- /dev/null +++ b/.github/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + types: [opened, synchronize, reopened] +env: + CI: ${{ vars.CI }} +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: pnpm-setup-node + uses: ./.github/actions/pnpm-setup-node + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Run Lint + run: pnpm lint + + - name: Run Tests + run: pnpm test + + - name: Run Build + run: pnpm build