From d6da3dc47ad3c0a2c059be4b8b3dfb996e03d144 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 12 Dec 2023 12:54:24 +0700 Subject: [PATCH] ci: move check steps to `check-package` job in `test` workflow --- .github/workflows/build.yaml | 6 ------ .github/workflows/test.yaml | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1c74030..23d0d7a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -29,12 +29,6 @@ jobs: - name: Install Dependencies run: yarn install - - name: Check Format - run: yarn format - - - name: Check Lint - run: yarn lint - - name: Bundle Package run: yarn bundle diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 364c364..294fc6d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,6 +5,36 @@ on: push: branches: [main] jobs: + check-package: + name: Check Package + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - name: Setup Node.js + uses: actions/setup-node@v4.0.0 + with: + node-version: latest + + - name: Enable Yarn + run: corepack enable yarn + + - name: Cache Dependencies + uses: actions/cache@v3.3.2 + with: + path: .yarn + key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }} + + - name: Install Dependencies + run: yarn install + + - name: Check Format + run: yarn format && git diff --exit-code HEAD + + - name: Check Lint + run: yarn lint + test-package: name: Test Package runs-on: ubuntu-latest