feat: 优化数据加载逻辑,添加延迟执行以提高触发成功率 #190 #283
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: CI | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| - main | |
| paths-ignore: | |
| - LICENSE | |
| - README-cmn_CN.md | |
| - README-cmn_TW.md | |
| - docs/** | |
| pull_request: | |
| branches: | |
| - dev | |
| - main | |
| paths-ignore: | |
| - LICENSE | |
| - README-cmn_CN.md | |
| - README-cmn_TW.md | |
| - docs/** | |
| jobs: | |
| test: | |
| name: Test | |
| strategy: | |
| matrix: | |
| node: [lts/*] | |
| os: [ubuntu-latest] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set node ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| run_install: | | |
| - args: [--frozen-lockfile] | |
| - name: Lint | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: pnpm run lint | |
| - name: Type check | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: pnpm run typecheck | |
| - name: Knip | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: pnpm run knip | |
| - name: Build Extension | |
| run: pnpm build | |
| - name: Upload Chrome Extension Zip | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 'lts/*' && github.ref_name == 'main' }} | |
| uses: actions/upload-artifact@v4.3.1 | |
| with: | |
| name: BewlyCat-chrome-extension | |
| path: extension | |
| - name: Build Firefox Extension | |
| run: pnpm build-firefox | |
| - name: Upload Firefox Extension Zip | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 'lts/*' && github.ref_name == 'main' }} | |
| uses: actions/upload-artifact@v4.3.1 | |
| with: | |
| name: BewlyCat-firefox-extension | |
| path: extension-firefox |