fix: fix lifecycle error #182
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: 代码合并检查 | |
| on: [push, pull_request] | |
| # on: | |
| # pull_request: | |
| # types: | |
| # - opened | |
| # - synchronize | |
| # - reopened | |
| # branches: | |
| # - master | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| Lint: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - windows-latest | |
| - macos-latest | |
| name: 代码风格检查 ${{ matrix.platform }} | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Configure Git | |
| shell: bash | |
| run: | | |
| git config --global core.autocrlf false | |
| - name: Checkout Commit | |
| uses: actions/checkout@v4 | |
| - name: Setup Environment | |
| uses: './.github/actions/setup-env' | |
| - name: Check Code Style | |
| run: pnpm run lint | |
| UnitTest: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - windows-latest | |
| - macos-latest | |
| name: 单元测试 ${{ matrix.platform }} | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout Commit | |
| uses: actions/checkout@v4 | |
| - name: Setup Environment | |
| uses: './.github/actions/setup-env' | |
| - name: Test Prepare | |
| run: pnpm run test:prepare | |
| - name: Test Code | |
| run: pnpm run test | |
| Build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - windows-latest | |
| - macos-latest | |
| name: 构建测试 ${{ matrix.platform }} | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout Commit | |
| uses: actions/checkout@v4 | |
| - name: Setup Environment | |
| uses: './.github/actions/setup-env' | |
| - name: Build Website | |
| run: pnpm run build |