From 069b7a2062a13bd492da63eae2d820d8af9d74f4 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Fri, 7 Jun 2024 12:53:52 +0700 Subject: [PATCH] ci: separate `check-package` job to `check` workflow (#192) --- .github/workflows/check.yaml | 31 +++++++++++++++++++++++++++++++ .github/workflows/test.yaml | 25 ------------------------- 2 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/check.yaml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..bd2c2a1 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,31 @@ +name: Check +on: + workflow_dispatch: + pull_request: + push: + branches: [main] +jobs: + check-workspaces: + name: Check Workspaces + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4.1.6 + + - name: Setup Node.js + uses: actions/setup-node@v4.0.2 + with: + node-version: latest + + - name: Setup Yarn + uses: threeal/setup-yarn-action@v2.0.0 + with: + version: stable + + - name: Check Format + run: | + yarn workspaces foreach --all --topological run format + git diff --exit-code HEAD + + - name: Check Lint + run: yarn workspaces foreach --all --topological run lint diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 68f9cf1..42849be 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -5,31 +5,6 @@ on: push: branches: [main] jobs: - check-workspaces: - name: Check Workspaces - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.6 - - - name: Setup Node.js - uses: actions/setup-node@v4.0.2 - with: - node-version: latest - - - name: Setup Yarn - uses: threeal/setup-yarn-action@v2.0.0 - with: - version: stable - - - name: Check Format - run: | - yarn workspaces foreach --all --topological run format - git diff --exit-code HEAD - - - name: Check Lint - run: yarn workspaces foreach --all --topological run lint - test-workspaces: name: Test Workspaces runs-on: ubuntu-latest