feat(performance): add live monitoring layout presets (#1802) #3659
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: | |
| pull_request: | |
| push: | |
| branches: | |
| - develop | |
| permissions: read-all | |
| jobs: | |
| # | |
| # Checks to see what changed | |
| # | |
| change-detection: | |
| runs-on: ubuntu-slim | |
| outputs: | |
| is-push: ${{ steps.meta.outputs.is_push }} | |
| frontend-changed: ${{ steps.changes.outputs.frontend }} | |
| backend-changed: ${{ steps.changes.outputs.backend }} | |
| core-changed: ${{ steps.changes.outputs.core }} | |
| tauri-changed: ${{ steps.changes.outputs.tauri }} | |
| frontend-deps-changed: ${{ steps.changes.outputs.frontend-deps }} | |
| backend-deps-changed: ${{ steps.changes.outputs.backend-deps }} | |
| cargo-license-config-changed: ${{ steps.changes.outputs.cargo-license-config }} | |
| tauri-deps-changed: ${{ steps.tauri-deps.outputs.changed }} | |
| actions-changed: ${{ steps.changes.outputs.actions }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 2 | |
| - id: meta | |
| run: echo "is_push=${{ github.event_name == 'push' }}" >> "$GITHUB_OUTPUT" | |
| shell: bash | |
| - name: Check changed files | |
| uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 | |
| id: changes | |
| background: true | |
| with: | |
| filters: | | |
| frontend: | |
| - 'src/**' | |
| - 'e2e/**' | |
| - 'e2e-native/**' | |
| - 'package*.json' | |
| - 'vite.config.ts' | |
| - 'playwright.config.ts' | |
| - 'playwright.perf.config.ts' | |
| - 'playwright.memory.config.ts' | |
| - 'tsconfig*.json' | |
| - '.github/actions/**' | |
| - '.github/scripts/**' | |
| backend: | |
| - 'core/**' | |
| - 'src-tauri/**' | |
| - 'Cargo.*' | |
| - '.cargo/**' | |
| - '.github/actions/**' | |
| - '.github/scripts/**' | |
| core: | |
| - 'core/**' | |
| - 'Cargo.*' | |
| - '.cargo/**' | |
| - '.github/actions/**' | |
| - '.github/scripts/**' | |
| tauri: | |
| - 'src-tauri/**' | |
| - 'e2e-native/**' | |
| - 'Cargo.*' | |
| - '.cargo/**' | |
| - '.github/actions/**' | |
| - '.github/scripts/**' | |
| frontend-deps: | |
| - 'package*.json' | |
| - '.github/actions/**' | |
| - '.github/scripts/**' | |
| backend-deps: | |
| - 'core/Cargo.toml' | |
| - 'src-tauri/Cargo.toml' | |
| - 'Cargo.*' | |
| - '.cargo/**' | |
| - '.github/actions/**' | |
| - '.github/scripts/**' | |
| cargo-license-config: | |
| - 'src-tauri/deny.toml' | |
| - '.github/actions/setup-rust/**' | |
| - '.github/workflows/ci.yml' | |
| actions: | |
| - '.github/workflows/**' | |
| - '.github/actions/**' | |
| - '.github/scripts/**' | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| with: | |
| install-deps: "false" | |
| setup-safe-chain: "false" | |
| - name: Check Tauri dependency changes | |
| id: tauri-deps | |
| shell: bash | |
| run: | | |
| base_ref="HEAD^" | |
| if ! git rev-parse --verify "$base_ref" >/dev/null 2>&1; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| exit 0 | |
| fi | |
| node .github/scripts/check-tauri-deps-changed.ts "$base_ref" | |
| - name: Wait for changed file detection | |
| wait: changes | |
| # | |
| # GitHub Actions lint | |
| # | |
| lint-actions: | |
| needs: change-detection | |
| # actionlint 1.7.11 does not understand GitHub Actions step-level | |
| # background/wait/wait-all syntax yet. | |
| if: ${{ false }} | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Download actionlint | |
| id: get_actionlint | |
| run: bash <(curl -s https://raw.githubusercontent.com/rhysd/actionlint/393031adb9afb225ee52ae2ccd7a5af5525e03e8/scripts/download-actionlint.bash) 1.7.11 | |
| shell: bash | |
| - name: Run actionlint | |
| run: ${{ steps.get_actionlint.outputs.executable }} -color | |
| shell: bash | |
| # | |
| # Rust formatting | |
| # | |
| rust-format: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.backend-changed == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| components: rustfmt | |
| - name: Check Rust formatting | |
| run: cargo fmt --all -- --check | |
| # | |
| # Core lint and clippy | |
| # | |
| lint-core: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.core-changed == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ["windows-latest", "ubuntu-22.04", "macos-latest"] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: ./.github/actions/setup-linux-deps | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| - name: Check Core clippy | |
| run: cargo clippy -p hardviz-core --all-targets -- -D warnings | |
| # | |
| # Core tests | |
| # | |
| test-core: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.core-changed == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ["windows-latest", "ubuntu-22.04", "macos-latest"] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: ./.github/actions/setup-linux-deps | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| components: "" | |
| - name: Run Core tests | |
| run: cargo test -p hardviz-core -- --test-threads=1 --nocapture | |
| # | |
| # Tauri lint and clippy | |
| # | |
| lint-tauri: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.tauri-changed == 'true' || needs.change-detection.outputs.backend-deps-changed == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ["windows-latest", "ubuntu-22.04", "macos-latest"] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: ./.github/actions/setup-linux-deps | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| - name: Check Tauri clippy | |
| run: cargo clippy -p hardware_visualizer --all-targets -- -D warnings | |
| # | |
| # Tauri tests | |
| # | |
| test-tauri: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.tauri-changed == 'true' || needs.change-detection.outputs.backend-deps-changed == 'true' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ["windows-latest", "ubuntu-22.04", "macos-latest"] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: ./.github/actions/setup-linux-deps | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| components: "" | |
| - name: Install cargo-llvm-cov | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: taiki-e/install-action@16b05812d776ae1dfaabc8277e421fb6d2506419 # v2.82.7 | |
| with: | |
| tool: cargo-llvm-cov | |
| - name: Run Tauri tests with coverage | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: cargo llvm-cov -p hardware_visualizer --no-report -- --test-threads=1 --nocapture | |
| - name: Run Tauri tests | |
| if: matrix.platform != 'ubuntu-22.04' | |
| run: cargo test -p hardware_visualizer -- --test-threads=1 --nocapture | |
| - name: Generate coverage report | |
| if: matrix.platform == 'ubuntu-22.04' | |
| id: coverage-report | |
| run: | | |
| { | |
| echo 'REPORT<<EOF' | |
| cargo llvm-cov report -p hardware_visualizer 2>&1 | |
| echo 'EOF' | |
| } >> "$GITHUB_OUTPUT" | |
| shell: bash | |
| - name: Report Rust coverage | |
| if: matrix.platform == 'ubuntu-22.04' && github.event_name == 'pull_request' | |
| uses: marocchino/sticky-pull-request-comment@5770ad5eb8f42dd2c4f34da00c94c5381e49af88 # v3.0.5 | |
| with: | |
| header: rust-coverage | |
| message: | | |
| ## Rust Tauri Coverage Report | |
| <details> | |
| <summary>Coverage Details</summary> | |
| ``` | |
| ${{ steps.coverage-report.outputs.REPORT }} | |
| ``` | |
| </details> | |
| # | |
| # Core-to-Tauri integration check | |
| # | |
| check-core-tauri-integration: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push != 'true' && needs.change-detection.outputs.core-changed == 'true' && needs.change-detection.outputs.tauri-changed != 'true' && needs.change-detection.outputs.backend-deps-changed != 'true' | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Linux dependencies | |
| uses: ./.github/actions/setup-linux-deps | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| components: "" | |
| - name: Prepare frontendDist placeholder | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| printf '<!doctype html><html><body></body></html>\n' > dist/index.html | |
| - name: Check Tauri crate against changed Core API | |
| run: cargo check -p hardware_visualizer --all-targets --features custom-protocol | |
| # | |
| # Generated Tauri bindings freshness | |
| # | |
| check-tauri-bindings: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.frontend-changed == 'true' || needs.change-detection.outputs.core-changed == 'true' || needs.change-detection.outputs.tauri-changed == 'true' || needs.change-detection.outputs.backend-deps-changed == 'true' || needs.change-detection.outputs.actions-changed == 'true' | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Linux dependencies | |
| uses: ./.github/actions/setup-linux-deps | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| components: "" | |
| - name: Prepare frontendDist placeholder | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| printf '<!doctype html><html><body></body></html>\n' > dist/index.html | |
| - name: Regenerate Tauri bindings | |
| run: cargo run --locked -p hardware_visualizer --features bindings-export --bin export_bindings | |
| - name: Check generated bindings are current | |
| run: git diff --exit-code -- src/rspc/bindings.ts | |
| # | |
| # Build test | |
| # | |
| test-build: | |
| needs: change-detection | |
| # Tauri dependency updates use the Tauri CLI build path to keep npm/Cargo version consistency checks. | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.tauri-changed == 'true' || needs.change-detection.outputs.backend-deps-changed == 'true' || needs.change-detection.outputs.tauri-deps-changed == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ["windows-latest", "ubuntu-22.04", "macos-latest"] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Linux dependencies (source-only PR) | |
| if: ${{ github.event_name == 'pull_request' && needs.change-detection.outputs.tauri-deps-changed != 'true' && matrix.platform == 'ubuntu-22.04' }} | |
| background: true | |
| uses: ./.github/actions/setup-linux-deps | |
| - name: Setup Linux dependencies (Tauri CLI build) | |
| if: ${{ (github.event_name != 'pull_request' || needs.change-detection.outputs.tauri-deps-changed == 'true') && matrix.platform == 'ubuntu-22.04' }} | |
| background: true | |
| uses: ./.github/actions/setup-linux-deps | |
| with: | |
| extra-packages: "libfuse2 libappindicator3-dev patchelf" | |
| - name: Cache AppRun binary | |
| if: ${{ (github.event_name != 'pull_request' || needs.change-detection.outputs.tauri-deps-changed == 'true') && runner.os == 'Linux' }} | |
| background: true | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~/.cache/tauri/AppRun-x86_64 | |
| key: tauri-apprun-x86_64 | |
| - name: Cache WiX binary | |
| if: ${{ (github.event_name != 'pull_request' || needs.change-detection.outputs.tauri-deps-changed == 'true') && runner.os == 'Windows' }} | |
| background: true | |
| uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 | |
| with: | |
| path: ~\AppData\Local\tauri\WixTools | |
| key: tauri-wix-314 | |
| - name: Optimize Windows build environment | |
| if: matrix.platform == 'windows-latest' | |
| background: true | |
| run: | | |
| echo "CARGO_INCREMENTAL=0" >> "$GITHUB_ENV" | |
| - name: Wait for platform preparation | |
| wait-all: true | |
| - name: Fix linuxdeploy permissions | |
| if: ${{ (github.event_name != 'pull_request' || needs.change-detection.outputs.tauri-deps-changed == 'true') && matrix.platform == 'ubuntu-22.04' }} | |
| run: chmod +x ./src-tauri/target/release/bundle/appimage/linuxdeploy-*.AppImage || true | |
| - name: Unset problematic env vars | |
| if: ${{ (github.event_name != 'pull_request' || needs.change-detection.outputs.tauri-deps-changed == 'true') && matrix.platform == 'ubuntu-22.04' }} | |
| run: | | |
| unset GTK_PATH | |
| unset LD_LIBRARY_PATH | |
| - name: Pre-download AppRun if not cached | |
| if: ${{ (github.event_name != 'pull_request' || needs.change-detection.outputs.tauri-deps-changed == 'true') && runner.os == 'Linux' }} | |
| run: | | |
| mkdir -p ~/.cache/tauri | |
| if [ ! -f ~/.cache/tauri/AppRun-x86_64 ]; then | |
| curl -L https://github.com/tauri-apps/binary-releases/releases/download/apprun-old/AppRun-x86_64 -o ~/.cache/tauri/AppRun-x86_64 | |
| chmod +x ~/.cache/tauri/AppRun-x86_64 | |
| fi | |
| - name: Pre-download WiX if not cached | |
| if: ${{ (github.event_name != 'pull_request' || needs.change-detection.outputs.tauri-deps-changed == 'true') && runner.os == 'Windows' }} | |
| shell: pwsh | |
| run: | | |
| $wixDir = "$env:LOCALAPPDATA\tauri\WixTools" | |
| if (-not (Test-Path $wixDir)) { | |
| New-Item -ItemType Directory -Force -Path $wixDir | |
| Invoke-WebRequest -Uri https://github.com/wixtoolset/wix3/releases/download/wix3141rtm/wix314-binaries.zip -OutFile "$wixDir\wix314.zip" | |
| Expand-Archive -Path "$wixDir\wix314.zip" -DestinationPath $wixDir -Force | |
| Remove-Item "$wixDir\wix314.zip" | |
| } | |
| - name: Setup Node.js | |
| if: ${{ github.event_name != 'pull_request' || needs.change-detection.outputs.tauri-deps-changed == 'true' }} | |
| background: true | |
| uses: ./.github/actions/setup-node | |
| - name: Setup Rust | |
| background: true | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| components: "" | |
| - name: Wait for toolchain setup | |
| wait-all: true | |
| - name: Prepare frontendDist placeholder | |
| if: ${{ github.event_name == 'pull_request' && needs.change-detection.outputs.tauri-deps-changed != 'true' }} | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| printf '<!doctype html><html><body></body></html>\n' > dist/index.html | |
| - name: Build Tauri Rust crate (CI optimized for PR) | |
| if: ${{ github.event_name == 'pull_request' && needs.change-detection.outputs.tauri-deps-changed != 'true' }} | |
| run: cargo build -p hardware_visualizer --profile ci --features custom-protocol | |
| - name: Build with Tauri (version consistency for Tauri dependency PR) | |
| if: ${{ github.event_name == 'pull_request' && needs.change-detection.outputs.tauri-deps-changed == 'true' }} | |
| uses: tauri-apps/tauri-action@84b9d35b5fc46c1e45415bdb6144030364f7ebc5 # v0.6.2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| args: --no-bundle -- --profile ci | |
| - name: Build with Tauri (Release profile for push) | |
| if: github.event_name != 'pull_request' | |
| uses: tauri-apps/tauri-action@84b9d35b5fc46c1e45415bdb6144030364f7ebc5 # v0.6.2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| args: --no-bundle | |
| # | |
| # Frontend checks | |
| # | |
| check-frontend: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.frontend-changed == 'true' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Frontend lint | |
| id: frontend-lint | |
| background: true | |
| run: npm run lint:ci | |
| - name: Run frontend tests with coverage | |
| run: npm test | |
| - name: Report coverage | |
| uses: davelosert/vitest-coverage-report-action@3c054a2d2e2ca45446417ad5d6d5eb33092af8f1 # v2.12.1 | |
| with: | |
| json-summary-path: coverage/coverage-summary.json | |
| - name: Wait for frontend lint | |
| wait: frontend-lint | |
| # | |
| # Frontend E2E captures (Playwright web/mock harness, issue #1609) | |
| # | |
| test-e2e-web: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.frontend-changed == 'true' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Run E2E capture tests | |
| run: npm run test:e2e | |
| # Keep evidence captures even when the suite fails after launch. | |
| - name: Upload capture artifacts | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: e2e-captures | |
| path: test-results/captures/ | |
| if-no-files-found: warn | |
| - name: Upload Playwright report | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: e2e-report | |
| path: | | |
| test-results/report/ | |
| test-results/output/ | |
| if-no-files-found: ignore | |
| # Publish captures to the e2e-captures branch and embed them in a | |
| # sticky PR comment. Same-repo PRs only (forks get a read-only token). | |
| - name: Comment captures on PR | |
| if: always() && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| HEAD_SHA: ${{ github.event.pull_request.head.sha }} | |
| run: bash .github/scripts/comment-e2e-captures.sh | |
| # | |
| # Frontend render performance checks (Playwright web/mock harness) | |
| # | |
| test-render-perf: | |
| needs: change-detection | |
| if: github.event_name == 'pull_request' && needs.change-detection.outputs.frontend-changed == 'true' | |
| continue-on-error: true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Run render performance tests | |
| run: npm run test:perf:render | |
| - name: Upload render performance results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: render-perf-results | |
| path: test-results/render-perf/ | |
| if-no-files-found: warn | |
| # | |
| # Frontend memory growth checks (Playwright web/mock IPC harness) | |
| # | |
| test-render-memory-perf: | |
| needs: change-detection | |
| if: github.event_name == 'pull_request' && needs.change-detection.outputs.frontend-changed == 'true' | |
| continue-on-error: true | |
| runs-on: ubuntu-latest | |
| env: | |
| RENDER_MEMORY_WARMUP_MS: "10000" | |
| RENDER_MEMORY_DURATION_MS: "30000" | |
| RENDER_MEMORY_SAMPLE_INTERVAL_MS: "5000" | |
| RENDER_MEMORY_TAIL_WINDOW_MS: "15000" | |
| RENDER_MEMORY_STREAM_INTERVAL_MS: "1000" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Install Playwright Chromium | |
| run: npx playwright install --with-deps chromium | |
| - name: Run render memory performance tests | |
| run: npm run test:perf:render-memory | |
| - name: Upload render memory performance results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: render-memory-perf-results | |
| path: test-results/render-memory/ | |
| if-no-files-found: warn | |
| # | |
| # Native Tauri E2E smoke (tauri-driver/WebDriver, issue #1610) | |
| # | |
| test-e2e-native: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.frontend-changed == 'true' || needs.change-detection.outputs.tauri-changed == 'true' || needs.change-detection.outputs.frontend-deps-changed == 'true' || needs.change-detection.outputs.backend-deps-changed == 'true' | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Typecheck native E2E runner | |
| run: npm run typecheck:e2e:native | |
| - name: Setup Linux dependencies | |
| uses: ./.github/actions/setup-linux-deps | |
| with: | |
| extra-packages: webkit2gtk-driver xvfb libayatana-appindicator3-dev | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| - name: Install tauri-driver | |
| run: cargo install tauri-driver --locked --version 2.0.6 | |
| - name: Run native E2E smoke | |
| run: xvfb-run npm run test:e2e:native | |
| - name: Upload native capture artifacts | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: e2e-native-captures | |
| path: test-results/captures/ | |
| if-no-files-found: warn | |
| # | |
| # Frontend Build | |
| # | |
| build-frontend: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.frontend-changed == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Run frontend build | |
| run: npm run build | |
| # | |
| # License checks | |
| # | |
| license-check-npm: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.frontend-deps-changed == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Generate licenses.json | |
| run: npm run license-checker | |
| - name: Check licenses | |
| run: node --experimental-strip-types .github/scripts/check-licenses.ts licenses.json | |
| - name: Extract Apache NOTICE | |
| run: node --experimental-strip-types .github/scripts/extract-apache-notices.ts licenses.json notices | |
| license-check-cargo: | |
| needs: change-detection | |
| if: needs.change-detection.outputs.is-push == 'true' || needs.change-detection.outputs.backend-deps-changed == 'true' || needs.change-detection.outputs.cargo-license-config-changed == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: ["windows-latest", "ubuntu-22.04", "macos-latest"] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Setup Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| uses: ./.github/actions/setup-linux-deps | |
| - name: Setup Rust | |
| uses: ./.github/actions/setup-rust | |
| with: | |
| components: "" | |
| - name: Install cargo-deny | |
| run: cargo install cargo-deny --version 0.19.4 --locked | |
| - name: Check Rust licenses | |
| run: cargo deny --manifest-path Cargo.toml check --config src-tauri/deny.toml licenses | |
| # | |
| # Final merge gate: Strict checks for required jobs = success, unnecessary jobs = skipped | |
| # | |
| merge-gate: | |
| name: Merge Gate | |
| if: ${{ always() }} | |
| runs-on: ubuntu-slim | |
| needs: | |
| - change-detection | |
| - lint-actions | |
| - rust-format | |
| - lint-core | |
| - test-core | |
| - lint-tauri | |
| - test-tauri | |
| - check-core-tauri-integration | |
| - check-tauri-bindings | |
| - test-build | |
| - check-frontend | |
| - test-e2e-web | |
| - test-e2e-native | |
| - build-frontend | |
| - license-check-npm | |
| - license-check-cargo | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| node-version: "24" | |
| - name: Gate (fail on failure/cancelled) | |
| env: | |
| NEEDS_JSON: ${{ toJson(needs) }} | |
| run: node .github/scripts/merge-gate.ts |