Show clipped benchmark rows in inference tables / 在推理表格中显示裁剪数据行 #1861
Workflow file for this run
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: 'Tests (E2E)' | |
| on: | |
| pull_request: | |
| branches: [main, master] | |
| types: [opened, synchronize, ready_for_review] | |
| paths: | |
| - '.github/workflows/tests-e2e.yml' | |
| - 'package.json' | |
| - 'packages/app/**' | |
| - 'packages/constants/**' | |
| - 'packages/db/**' | |
| - 'bunfig.toml' | |
| - 'bun.lock' | |
| - 'tsconfig.json' | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| component-tests: | |
| name: Component tests | |
| if: ${{ !github.event.pull_request.draft }} | |
| timeout-minutes: 15 | |
| runs-on: blacksmith-8vcpu-ubuntu-2404 | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Bun | |
| id: setup-bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version-file: package.json | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '24' | |
| - name: Restore Bun package cache | |
| id: bun-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ runner.arch }}-${{ steps.setup-bun.outputs.bun-version }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-${{ runner.arch }}-${{ steps.setup-bun.outputs.bun-version }}- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| env: | |
| CYPRESS_INSTALL_BINARY: '0' | |
| - name: Restore Cypress binary cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/Cypress | |
| key: cypress-binary-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| cypress-binary-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Install Cypress binary if missing | |
| working-directory: packages/app | |
| run: bunx cypress verify || bunx cypress install | |
| - name: Run component tests | |
| working-directory: packages/app | |
| run: bunx cypress run --component --browser chrome | |
| env: | |
| CI: true | |
| cypress: | |
| name: E2E (${{ matrix.browser }}, shard ${{ matrix.shard }}) | |
| if: ${{ !github.event.pull_request.draft }} | |
| timeout-minutes: 15 | |
| runs-on: blacksmith-8vcpu-ubuntu-2404 | |
| permissions: | |
| contents: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| browser: [chrome, firefox] | |
| # Cap at four shards per browser. Every shard repeats checkout, dependency | |
| # installation, Cypress setup, and a full app build; beyond four, that | |
| # duplicated fixed cost dominates and yields sharply diminishing returns. | |
| shard: [1, 2, 3, 4] | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Bun | |
| id: setup-bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version-file: package.json | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| node-version: '24' | |
| - name: Restore Bun package cache | |
| id: bun-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ runner.os }}-bun-${{ runner.arch }}-${{ steps.setup-bun.outputs.bun-version }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bun-${{ runner.arch }}-${{ steps.setup-bun.outputs.bun-version }}- | |
| - uses: browser-actions/setup-firefox@0bc507ddf224827e3b1af68e014d5e42ab93e795 # v1.7.2 | |
| if: matrix.browser == 'firefox' | |
| with: | |
| firefox-version: latest | |
| # Persist .next/cache between builds (Turbopack compiler cache — enabled | |
| # via turbopackFileSystemCacheForBuild in next.config.ts for CI — plus | |
| # the incremental fetch cache), per | |
| # https://nextjs.org/docs/pages/guides/ci-build-caching#github-actions. | |
| # Runs before `bun install` so hashFiles never scans node_modules. | |
| - name: Restore Next.js build cache | |
| id: nextjs-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: packages/app/.next/cache | |
| # New cache whenever packages or source files change; fall back to | |
| # the newest cache for the same lockfile so changed sources still | |
| # start from a warm compiler cache. | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('bun.lock') }}-${{ hashFiles('packages/**/*.js', 'packages/**/*.jsx', 'packages/**/*.ts', 'packages/**/*.tsx') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('bun.lock') }}- | |
| ${{ runner.os }}-nextjs- | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| env: | |
| CYPRESS_INSTALL_BINARY: '0' | |
| - name: Restore Cypress binary cache | |
| id: cypress-cache | |
| uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/Cypress | |
| key: cypress-binary-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: | | |
| cypress-binary-${{ runner.os }}-${{ runner.arch }}- | |
| - name: Install Cypress binary if missing | |
| working-directory: packages/app | |
| run: bunx cypress verify || bunx cypress install | |
| - name: Save Cypress binary cache | |
| if: ${{ matrix.browser == 'chrome' && matrix.shard == 1 && steps.cypress-cache.outputs.cache-hit != 'true' }} | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/Cypress | |
| key: ${{ steps.cypress-cache.outputs.cache-primary-key }} | |
| # The component job only restores this cache. One E2E shard writes it, avoiding | |
| # concurrent cache reservations across the nine parallel test jobs. | |
| - name: Save Bun package cache | |
| if: ${{ matrix.browser == 'chrome' && matrix.shard == 1 && steps.bun-cache.outputs.cache-hit != 'true' }} | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: ${{ steps.bun-cache.outputs.cache-primary-key }} | |
| - name: Build app | |
| run: bun run build | |
| env: | |
| E2E_FIXTURES: '1' | |
| - name: Save Next.js build cache | |
| if: ${{ matrix.browser == 'chrome' && matrix.shard == 1 && steps.nextjs-cache.outputs.cache-hit != 'true' }} | |
| uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: packages/app/.next/cache | |
| key: ${{ steps.nextjs-cache.outputs.cache-primary-key }} | |
| - name: Run integration tests | |
| uses: cypress-io/github-action@fa4a118725a8f001170d49631ea89e5d66fee626 # v7.4.1 | |
| with: | |
| working-directory: packages/app | |
| install: false | |
| start: bun run start | |
| wait-on: 'http://localhost:3000' | |
| browser: ${{ matrix.browser }} | |
| publish-summary: false | |
| env: | |
| CI: true | |
| E2E_FIXTURES: '1' | |
| # cypress-split picks the subset of specs for this shard. | |
| # SPLIT_INDEX1 is 1-based to match matrix.shard values [1..4]. | |
| # SPLIT_FILE seeds the balance from observed timings; | |
| # SPLIT_OUTPUT_FILE redirects on-disk updates to a throwaway path | |
| # so CI never tries to mutate the committed timings.json. | |
| SPLIT: 4 | |
| SPLIT_INDEX1: ${{ matrix.shard }} | |
| SPLIT_FILE: timings.json | |
| SPLIT_OUTPUT_FILE: /tmp/cypress-split-out.json | |
| SPLIT_SUMMARY: 'false' |