deps: Bump @radix-ui/react-context-menu from 2.2.16 to 2.3.1 #405
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: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| actions: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| ELECTRON_SKIP_BINARY_DOWNLOAD: '1' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y python3 make g++ | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Rebuild native modules for CI Node version | |
| run: npm rebuild better-sqlite3-multiple-ciphers | |
| - name: Security audit (production dependencies) | |
| run: npm audit --omit=dev --audit-level=moderate | |
| - name: Lint | |
| run: npm run lint | |
| - name: Type check | |
| run: npx tsc -p jsconfig.json --noEmit | |
| - name: Run core tests | |
| run: npm test | |
| - name: Rebuild native modules for Node.js | |
| run: npm rebuild better-sqlite3-multiple-ciphers | |
| - name: Run service tests | |
| run: npm run test:services | |
| - name: Run IPC tests | |
| run: npm run test:ipc | |
| - name: Run load tests | |
| run: npm run test:load | |
| - name: Run component tests with coverage | |
| run: npx vitest run --coverage | |
| - name: Check coverage threshold | |
| run: | | |
| node -e " | |
| const fs = require('fs'); | |
| const summary = JSON.parse(fs.readFileSync('coverage/coverage-summary.json', 'utf8')); | |
| const total = summary.total; | |
| const hardMin = 8; | |
| const target = 60; | |
| const lines = total.lines.pct; | |
| const branches = total.branches.pct; | |
| console.log('Coverage - Lines: ' + lines + '%, Branches: ' + branches + '%'); | |
| console.log('Hard minimum: ' + hardMin + '%, Target: ' + target + '%'); | |
| if (lines < hardMin || branches < hardMin) { | |
| console.error('Coverage below hard minimum of ' + hardMin + '%'); | |
| process.exit(1); | |
| } | |
| if (lines < target || branches < target) { | |
| console.log('::warning::Coverage below target of ' + target + '% — increase test coverage'); | |
| } else { | |
| console.log('Coverage target met (' + target + '%)'); | |
| } | |
| " | |
| - name: Rebuild for Electron | |
| run: npx @electron/rebuild -f | |
| - name: Build | |
| run: npm run build | |
| - name: Generate SBOM | |
| run: npx cyclonedx-npm --ignore-npm-errors --output-file sbom.json --output-format JSON | |
| - name: Upload SBOM artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: sbom | |
| path: sbom.json | |
| retention-days: 90 | |
| e2e: | |
| name: Playwright E2E Tests | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Cache Electron binary | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/electron | |
| key: electron-linux-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| electron-linux- | |
| - name: Install system dependencies | |
| run: sudo apt-get update && sudo apt-get install -y python3 make g++ xvfb | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Rebuild native modules for Electron | |
| run: npx @electron/rebuild -f | |
| - name: Build renderer | |
| run: npm run build | |
| - name: Install Playwright Electron dependencies | |
| run: npx playwright install --with-deps chromium | |
| - name: Run E2E tests | |
| env: | |
| # The seed step in electron/database/init.cjs reads this env var to | |
| # provision the first-launch admin password deterministically; the | |
| # E2E spec reads the same var so the login step doesn't depend on | |
| # the random setup token written to userData. | |
| TRANSTRACK_INITIAL_ADMIN_PASSWORD: 'E2E_ONLY_DoNotUseInProd!' | |
| run: xvfb-run --auto-servernum npm run test:e2e | |
| - name: Upload E2E report | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: e2e-report | |
| path: playwright-report | |
| retention-days: 30 | |
| build-windows: | |
| name: Windows Build Verification | |
| runs-on: windows-latest | |
| needs: build | |
| env: | |
| ELECTRON_SKIP_BINARY_DOWNLOAD: '1' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Build renderer | |
| run: npm run build | |
| - name: Run core tests | |
| run: npm test |