From fec9aa6ccf4e80ccb6f311cb47a0d5670d3b3274 Mon Sep 17 00:00:00 2001 From: L&H Date: Tue, 21 Nov 2023 19:08:36 +0800 Subject: [PATCH] chore: add github test action --- .github/workflows/test.yml | 17 +++++++++++++++++ package.json | 2 ++ 2 files changed, 19 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..13ff458 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,17 @@ +name: Test +on: [push] +jobs: + Run-Test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: corepack enable + - run: pnpm i + - run: pnpm run test diff --git a/package.json b/package.json index 89b5d19..12b8454 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,8 @@ "husky:pre-commit": "lint-staged", "husky:commit-msg": "commitlint --edit ${1}", "bundle": "rimraf dist && pnpm run build && gulp bundle", + "test": "pnpm run tscheck", + "tscheck": "tsc --noEmit", "watch": "tsc --watch", "build": "tsc --sourceMap false" },