mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
fix(ci): route cross-package test contracts narrowly
This commit is contained in:
51
.github/ci-paths.yml
vendored
51
.github/ci-paths.yml
vendored
@@ -20,14 +20,29 @@ ci:
|
||||
- ".github/workflows/ci.yml"
|
||||
|
||||
format:
|
||||
- ".github/**/*.yml"
|
||||
- "docs/**/*.md"
|
||||
- "packages/**/*.{cjs,css,html,js,json,jsonc,jsx,md,mjs,ts,tsx,yaml,yml}"
|
||||
- "*.{cjs,css,html,js,json,jsonc,jsx,md,mjs,ts,tsx,yaml,yml}"
|
||||
- ".agents/**/*.{cjs,css,html,js,json,jsonc,jsx,md,mjs,ts,tsx,yaml,yml}"
|
||||
- ".github/**/*.{cjs,css,html,js,json,jsonc,jsx,md,mjs,ts,tsx,yaml,yml}"
|
||||
- "**/*.{cjs,css,html,js,json,jsonc,jsx,md,mjs,ts,tsx,yaml,yml}"
|
||||
|
||||
quality:
|
||||
- "packages/**/*.{cjs,js,json,jsx,mjs,ts,tsx}"
|
||||
- "*.{cjs,js,json,jsx,mjs,ts,tsx}"
|
||||
- "**/*.{cjs,js,json,jsx,mjs,ts,tsx}"
|
||||
|
||||
daemon_launch:
|
||||
- "scripts/daemon-launch-contract.test.mjs"
|
||||
- "packages/server/package.json"
|
||||
- "packages/app/e2e/global-setup.ts"
|
||||
- "packages/server/src/server/daemon-e2e/connection-offer.e2e.test.ts"
|
||||
- "packages/desktop/src/daemon/runtime-paths.ts"
|
||||
- "nix/package.nix"
|
||||
|
||||
hub_cli:
|
||||
- "packages/cli/src/commands/hub/**"
|
||||
- "packages/cli/src/output/**"
|
||||
- "packages/cli/src/utils/client.ts"
|
||||
- "packages/cli/src/utils/command-options.ts"
|
||||
- "packages/server/src/server/hub/hub-cli-contract.e2e.test.ts"
|
||||
- "packages/server/src/server/hub/test-utils/relationship-harness.ts"
|
||||
- "packages/server/src/server/test-utils/hub-cli-entry.ts"
|
||||
|
||||
server:
|
||||
- "packages/server/**"
|
||||
@@ -38,6 +53,23 @@ desktop:
|
||||
- "packages/desktop/**"
|
||||
- "vitest.config.ts"
|
||||
|
||||
desktop_bridge:
|
||||
- "packages/desktop/src/main.ts"
|
||||
- "packages/desktop/src/preload.ts"
|
||||
- "packages/desktop/src/features/browser-automation/**"
|
||||
- "packages/desktop/src/features/browser-profile.ts"
|
||||
- "packages/desktop/src/features/browser-profile.test.ts"
|
||||
- "packages/desktop/src/features/browser-webviews/**"
|
||||
- "packages/desktop/scripts/browser-tab-bridge.e2e.mjs"
|
||||
- "packages/desktop/scripts/dev-runner.mjs"
|
||||
- "packages/desktop/package.json"
|
||||
- "packages/desktop/tsconfig.json"
|
||||
- "packages/app/src/components/browser-pane.electron.tsx"
|
||||
- "packages/app/src/panels/browser-panel.tsx"
|
||||
- "packages/app/src/panels/register-panels.ts"
|
||||
- "packages/app/metro.config.cjs"
|
||||
- "packages/app/package.json"
|
||||
|
||||
app:
|
||||
- "packages/app/**"
|
||||
- "vitest.config.ts"
|
||||
@@ -55,15 +87,16 @@ playwright:
|
||||
- "packages/app/index.ts"
|
||||
- "packages/app/*config.{cjs,js,ts}"
|
||||
- "packages/app/package.json"
|
||||
- "packages/server/**"
|
||||
|
||||
playwright_desktop:
|
||||
- "packages/desktop/**"
|
||||
- "packages/app/src/**/*.electron.{ts,tsx}"
|
||||
- "packages/app/e2e/fixtures.ts"
|
||||
- "packages/app/e2e/project-picker-desktop.spec.ts"
|
||||
- "packages/app/e2e/helpers/desktop-updates.ts"
|
||||
- "packages/app/e2e/helpers/**"
|
||||
- "packages/app/e2e/global-setup.ts"
|
||||
- "packages/app/metro.config.cjs"
|
||||
- "packages/app/playwright.config.ts"
|
||||
- "packages/app/package.json"
|
||||
|
||||
relay:
|
||||
- "packages/relay/**"
|
||||
|
||||
107
.github/workflows/ci.yml
vendored
107
.github/workflows/ci.yml
vendored
@@ -28,8 +28,11 @@ jobs:
|
||||
full: ${{ github.event_name != 'pull_request' || steps.filter.outputs.routing != 'false' || steps.filter.outputs.workspace != 'false' || steps.filter.outputs.ci != 'false' }}
|
||||
format: ${{ steps.filter.outputs.format }}
|
||||
quality: ${{ steps.filter.outputs.quality }}
|
||||
daemon_launch: ${{ steps.filter.outputs.daemon_launch }}
|
||||
hub_cli: ${{ steps.filter.outputs.hub_cli }}
|
||||
server: ${{ steps.filter.outputs.server }}
|
||||
desktop: ${{ steps.filter.outputs.desktop }}
|
||||
desktop_bridge: ${{ steps.filter.outputs.desktop_bridge }}
|
||||
app: ${{ steps.filter.outputs.app }}
|
||||
sdk: ${{ steps.filter.outputs.sdk }}
|
||||
playwright: ${{ steps.filter.outputs.playwright }}
|
||||
@@ -128,6 +131,45 @@ jobs:
|
||||
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/client
|
||||
npm pack --dry-run --ignore-scripts --workspace=@getpaseo/server
|
||||
|
||||
daemon-launch-contract:
|
||||
name: daemon-launch-contract
|
||||
needs: changes
|
||||
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.daemon_launch != 'false') }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
|
||||
- name: Verify daemon launch supervision
|
||||
run: node --test scripts/daemon-launch-contract.test.mjs
|
||||
|
||||
hub-cli-contract:
|
||||
name: hub-cli-contract
|
||||
needs: changes
|
||||
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.hub_cli != 'false') }}
|
||||
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 dependencies
|
||||
run: node scripts/npm-retry.mjs ci
|
||||
|
||||
- name: Build server dependencies
|
||||
run: npm run build:server-deps
|
||||
|
||||
- name: Verify the Hub CLI/daemon boundary
|
||||
run: npm run test:hub-cli-contract --workspace=@getpaseo/server
|
||||
|
||||
server-tests-ubuntu:
|
||||
name: server-tests (ubuntu-latest)
|
||||
needs: changes
|
||||
@@ -198,29 +240,6 @@ jobs:
|
||||
- name: Run desktop tests
|
||||
run: npm run test --workspace=@getpaseo/desktop
|
||||
|
||||
- name: Build app dependencies for desktop E2E
|
||||
if: runner.os == 'Linux'
|
||||
run: npm run build:app-deps
|
||||
|
||||
- name: Install virtual display
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y xvfb xauth
|
||||
|
||||
- name: Run real Electron browser tab bridge E2E
|
||||
if: runner.os == 'Linux'
|
||||
run: npm run test:e2e:browser-tab-bridge --workspace=@getpaseo/desktop
|
||||
env:
|
||||
PASEO_TAB_BRIDGE_E2E_ARTIFACT_DIR: ${{ runner.temp }}/browser-tab-bridge-e2e
|
||||
|
||||
- name: Upload browser tab bridge diagnostics
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure() && runner.os == 'Linux'
|
||||
with:
|
||||
name: browser-tab-bridge-e2e
|
||||
path: ${{ runner.temp }}/browser-tab-bridge-e2e
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
|
||||
- name: Build and smoke unpacked desktop app
|
||||
if: runner.os == 'Linux'
|
||||
run: npm run build:desktop -- --publish never --linux --x64 --dir
|
||||
@@ -248,6 +267,48 @@ jobs:
|
||||
contents: read
|
||||
steps: *desktop_test_steps
|
||||
|
||||
desktop-browser-bridge:
|
||||
name: desktop-browser-bridge
|
||||
needs: changes
|
||||
if: ${{ !cancelled() && (needs.changes.outputs.full != 'false' || needs.changes.outputs.desktop_bridge != 'false') }}
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "22"
|
||||
cache: "npm"
|
||||
|
||||
- name: Install dependencies with retry
|
||||
run: node scripts/npm-retry.mjs ci
|
||||
|
||||
- name: Build server stack
|
||||
run: npm run build:server
|
||||
|
||||
- name: Build app dependencies
|
||||
run: npm run build:app-deps
|
||||
|
||||
- name: Install virtual display
|
||||
run: sudo apt-get update && sudo apt-get install -y xvfb xauth
|
||||
|
||||
- name: Run real Electron browser tab bridge E2E
|
||||
run: npm run test:e2e:browser-tab-bridge --workspace=@getpaseo/desktop
|
||||
env:
|
||||
PASEO_TAB_BRIDGE_E2E_ARTIFACT_DIR: ${{ runner.temp }}/browser-tab-bridge-e2e
|
||||
|
||||
- name: Upload browser tab bridge diagnostics
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: browser-tab-bridge-e2e
|
||||
path: ${{ runner.temp }}/browser-tab-bridge-e2e
|
||||
if-no-files-found: ignore
|
||||
retention-days: 7
|
||||
|
||||
app-tests:
|
||||
name: app-tests
|
||||
needs: changes
|
||||
|
||||
Reference in New Issue
Block a user