From 23b789badd021a6b536f160847d0b7579e36e2a7 Mon Sep 17 00:00:00 2001 From: "Ray.Hao" <1490493387@qq.com> Date: Thu, 15 Jan 2026 18:13:41 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=88=A0=E9=99=A4=E5=8D=95=E5=85=83?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml.example | 105 ----------------------------- 1 file changed, 105 deletions(-) delete mode 100644 .github/workflows/test.yml.example diff --git a/.github/workflows/test.yml.example b/.github/workflows/test.yml.example deleted file mode 100644 index e1bf904f..00000000 --- a/.github/workflows/test.yml.example +++ /dev/null @@ -1,105 +0,0 @@ -name: 单元测试 - -on: - push: - branches: [main, dev] - pull_request: - branches: [main, dev] - -jobs: - test: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [20.x, 22.x] - - steps: - - name: 检出代码 - uses: actions/checkout@v4 - - - name: 安装 pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: 设置 Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: "pnpm" - - - name: 安装依赖 - run: pnpm install --frozen-lockfile - - - name: 运行测试 - run: pnpm test:run - - - name: 生成覆盖率报告 - run: pnpm test:coverage - - - name: 上传覆盖率报告 - uses: codecov/codecov-action@v3 - with: - files: ./coverage/coverage-final.json - flags: unittests - name: codecov-umbrella - - - name: 检查覆盖率阈值 - run: | - echo "检查测试覆盖率是否达到目标..." - # 可以在这里添加覆盖率阈值检查逻辑 - - lint: - runs-on: ubuntu-latest - - steps: - - name: 检出代码 - uses: actions/checkout@v4 - - - name: 安装 pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: 设置 Node.js - uses: actions/setup-node@v4 - with: - node-version: 20.x - cache: "pnpm" - - - name: 安装依赖 - run: pnpm install --frozen-lockfile - - - name: 运行 ESLint - run: pnpm lint:eslint - - - name: 运行 Prettier - run: pnpm lint:prettier - - - name: 运行 Stylelint - run: pnpm lint:stylelint - - type-check: - runs-on: ubuntu-latest - - steps: - - name: 检出代码 - uses: actions/checkout@v4 - - - name: 安装 pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: 设置 Node.js - uses: actions/setup-node@v4 - with: - node-version: 20.x - cache: "pnpm" - - - name: 安装依赖 - run: pnpm install --frozen-lockfile - - - name: 类型检查 - run: pnpm type-check