chore: release v0.0.45 #120
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
| # Blade Code CI/CD Pipeline | |
| name: CI/CD | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| test: | |
| name: Test Suite (${{ matrix.node-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Install pnpm | |
| run: corepack prepare pnpm@8 --activate | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Run type check | |
| run: pnpm run type-check | |
| - name: Build project | |
| run: pnpm run build | |
| - name: Test build | |
| run: pnpm run start -- --help | |
| code-quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20.x' | |
| cache: 'pnpm' | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Install pnpm | |
| run: corepack prepare pnpm@8 --activate | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Run linter and formatter | |
| run: pnpm run check | |
| continue-on-error: true # 暂时允许失败,避免阻塞 MR | |
| cross-platform: | |
| name: Cross Platform (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - name: Enable corepack | |
| run: corepack enable | |
| - name: Install pnpm | |
| run: corepack prepare pnpm@8 --activate | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build project | |
| run: pnpm run build | |
| - name: Test CLI basics | |
| run: pnpm run start -- --help | |
| env: | |
| CI: true | |
| NODE_ENV: test |