types: 优化preload的类型声明 #32
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, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest, ubuntu-latest] | |
| node-version: [20] | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| # 注意这里使用pnpm而不是npm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'pnpm' | |
| - name: pnpm install for macOS and Linux | |
| if: runner.os != 'Windows' | |
| run: pnpm install | |
| shell: bash | |
| - name: pnpm install for Windows | |
| if: runner.os == 'Windows' | |
| run: | | |
| pnpm install | |
| shell: pwsh | |
| - name: pnpm test | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| pnpm run package | |
| pnpm run lint | |
| pnpm test |