Repository navigation
chore: bump version to 0.9.0 #76
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: ['**'] | |
| workflow_dispatch: | |
| jobs: | |
| # 快速检查:格式化 + lint,与测试/构建并行 | |
| format-lint: | |
| name: Format & Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Format check | |
| run: pnpm run format:check | |
| - name: Lint | |
| run: pnpm run lint | |
| # 测试 + 覆盖率上报(需要 ripgrep:部分工具/测试依赖 rg) | |
| test: | |
| name: Test & Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install ripgrep | |
| run: sudo apt-get update && sudo apt-get install -y ripgrep | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Test all packages | |
| run: pnpm run test | |
| - name: Coverage report (warning only, non-blocking) | |
| run: pnpm run test:coverage || echo "::warning::Test coverage is below the thresholds in vitest.config.ts. PR is not blocked by coverage." | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage/lcov.info | |
| fail_ci_if_error: false | |
| # 打包验证:与测试并行 | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v2 | |
| with: | |
| version: 9 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Test build | |
| run: pnpm run build |