refactor(dashboard): 仪表盘瘦身——移除请求趋势图、删模型饼图、模型统计表可展开 #2
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: [master] | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| syntax: | |
| name: Node syntax check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| - name: Check JS syntax for all src files | |
| run: | | |
| find src -name '*.js' -type f -print0 | xargs -0 -n1 node --check | |
| - name: Validate package.json | |
| run: node -e "JSON.parse(require('fs').readFileSync('package.json'))" | |
| - name: Validate JSON configs | |
| run: | | |
| for f in $(find . -maxdepth 2 -name '*.json' -not -path './node_modules/*' -not -path './.git/*'); do | |
| echo "Checking $f" | |
| node -e "JSON.parse(require('fs').readFileSync('$f'))" | |
| done | |
| test: | |
| name: Unit tests shard ${{ matrix.shard }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| shard: [0, 1, 2, 3] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| # image-resize.test.js imports jimp (the sole runtime dependency), so the | |
| # runner needs node_modules — without this step every shard that touches | |
| # a jimp-importing test fails with ERR_MODULE_NOT_FOUND. | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm run test:shard -- ${{ matrix.shard }} 4 |