-
Notifications
You must be signed in to change notification settings - Fork 1
Develop #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Develop #45
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7fa53d2
feat: 添加调度任务队列超时和去重逻辑,支持调度时间窗口
acai1998 321518b
feat: add TaskStatsDialog and TaskTableView components for task stati…
acai1998 4ba8f4c
feat: add AI Cases workspace view and utility functions for case mana…
acai1998 1807b7c
feat: 删除 GitHub 拉取请求模板文件,简化贡献流程
acai1998 98725ec
feat: add Bruno API automation native integration (Phase 1)
acai1998 6b45b23
feat: add Bruno API Automation Native Integration Design document
acai1998 f658417
feat: 添加 k6 API 性能烟雾测试工作流及相关配置
acai1998 26bd682
feat: 更新 k6 API 性能测试配置,支持从变量获取 BASE_URL,并添加 token 捕获功能
acai1998 d75522a
feat: 添加 Bruno 接口自动化页面及相关功能,包括仓库注册和同步
acai1998 8b20f4e
refactor: remove Bruno automation feature and related components
acai1998 4f104c6
feat: 添加 GitHub CI 工作流,支持多平台构建和测试
acai1998 54b2a94
Add unit tests for hooks and services in the frontend
acai1998 f40f38e
Potential fix for pull request finding 'CodeQL / Workflow does not co…
acai1998 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| name: CI/CD Pipeline | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main, master] | ||
| pull_request: | ||
| branches: [main, master] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint & Type Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: TypeScript check (frontend) | ||
| run: npx tsc --noEmit -p tsconfig.json | ||
|
|
||
| - name: TypeScript check (backend) | ||
| run: npx tsc --noEmit -p tsconfig.server.json | ||
|
|
||
| test: | ||
| name: Test (${{ matrix.platform }} / Node ${{ matrix.node }}) | ||
| needs: lint | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| platform: [ubuntu-latest, macos-latest, windows-latest] | ||
| node: [18, 20, 22] | ||
|
|
||
| runs-on: ${{ matrix.platform }} | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js ${{ matrix.node }} | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '${{ matrix.node }}' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run tests | ||
| run: npx vitest run | ||
|
|
||
| build: | ||
| name: Build Verification | ||
| needs: lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Build frontend | ||
| run: npm run build | ||
|
|
||
| - name: Build backend | ||
| run: npm run server:build | ||
|
|
||
| - name: Verify build output | ||
| run: | | ||
| test -f dist/index.html || (echo "Frontend build missing" && exit 1) | ||
| test -f dist/server/server/index.js || (echo "Backend build missing" && exit 1) | ||
| echo "Build verification passed" | ||
|
|
||
| coverage: | ||
| name: Test Coverage | ||
| needs: lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run tests with coverage | ||
| run: npx vitest run --coverage | ||
|
|
||
| - name: Extract coverage percentage | ||
| id: coverage | ||
| run: | | ||
| PCT=$(node -e " | ||
| const fs = require('fs'); | ||
| const p = require('path'); | ||
| const dir = 'coverage'; | ||
| const files = fs.readdirSync(dir).filter(f => f === 'coverage-summary.json'); | ||
| if (!files.length) { console.error('No coverage-summary.json found'); process.exit(1); } | ||
| const data = JSON.parse(fs.readFileSync(p.join(dir, files[0]), 'utf8')); | ||
| console.log(data.total.lines.pct); | ||
| ") | ||
| echo "percentage=$PCT" >> "$GITHUB_OUTPUT" | ||
| echo "Coverage: $PCT%" | ||
|
|
||
| - name: Upload coverage to Gist | ||
| if: github.event_name != 'pull_request' | ||
| uses: schneegans/dynamic-badges-action@v1.7.0 | ||
| with: | ||
| auth: ${{ secrets.GIST_TOKEN }} | ||
| gistID: ${{ secrets.COVERAGE_GIST_ID }} | ||
| filename: coverage.json | ||
| label: coverage | ||
| message: ${{ steps.coverage.outputs.percentage }}% | ||
| valColorRange: ${{ steps.coverage.outputs.percentage }} | ||
| minColorRange: 60 | ||
| maxColorRange: 90 | ||
| isError: ${{ steps.coverage.outputs.percentage < 60 }} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| name: k6 API Performance Smoke | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| # Daily at Singapore/China 09:00. GitHub cron uses UTC. | ||
| - cron: '0 1 * * *' | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| k6-smoke: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install k6 | ||
| run: | | ||
| sudo gpg -k | ||
| curl -s https://dl.k6.io/key.gpg | sudo gpg --dearmor -o /usr/share/keyrings/k6-archive-keyring.gpg | ||
| echo "deb [signed-by=/usr/share/keyrings/k6-archive-keyring.gpg] https://dl.k6.io/deb stable main" | sudo tee /etc/apt/sources.list.d/k6.list | ||
| sudo apt-get update | ||
| sudo apt-get install -y k6 | ||
|
|
||
| - name: Run k6 API smoke test | ||
| working-directory: perf | ||
| env: | ||
| BASE_URL: ${{ vars.PERF_BASE_URL || secrets.PERF_BASE_URL }} | ||
| API_TOKEN: ${{ secrets.PERF_API_TOKEN }} | ||
| SMOKE_EMAIL: ${{ secrets.PERF_SMOKE_EMAIL }} | ||
| SMOKE_PASSWORD: ${{ secrets.PERF_SMOKE_PASSWORD }} | ||
| run: | | ||
| k6 run \ | ||
| --summary-export k6-summary.json \ | ||
| smoke.js | ||
|
|
||
| - name: Upload k6 summary | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: k6-summary | ||
| path: perf/k6-summary.json | ||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.