From 929cf12da26c6d6d9e91da9764cfc33c34ed54ba Mon Sep 17 00:00:00 2001 From: qing Date: Fri, 15 Mar 2024 21:25:28 +0800 Subject: [PATCH] ci: move node-validation to seprate file --- .github/workflows/ci.yml | 30 ------------------------ .github/workflows/lint-check.yml | 40 ++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/lint-check.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d76ac45e4..b514ca71ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,36 +116,6 @@ jobs: - name: Run Test run: pnpm test - node-validation: - name: Node Validation - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install pnpm - uses: pnpm/action-setup@v3 - - - name: Install node - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - name: Install dependencies - run: pnpm install - - - name: Oxc Lint - run: pnpm lint-code - - - name: Lint Filename - run: pnpm lint-filename - - - name: Format Check - run: pnpm format:ci - - - name: Lint Spell - run: pnpm lint-spell - # changesets: # name: Changesets Status # runs-on: ubuntu-latest diff --git a/.github/workflows/lint-check.yml b/.github/workflows/lint-check.yml new file mode 100644 index 0000000000..d761487414 --- /dev/null +++ b/.github/workflows/lint-check.yml @@ -0,0 +1,40 @@ +name: Lint code + +on: + workflow_dispatch: + pull_request: + types: [opened, synchronize] + push: + branches: + - main + +jobs: + node-validation: + name: Node Validation + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v3 + + - name: Install node + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install dependencies + run: pnpm install + + - name: Oxc Lint + run: pnpm lint-code + + - name: Lint Filename + run: pnpm lint-filename + + - name: Format Check + run: pnpm format:ci + + - name: Lint Spell + run: pnpm lint-spell