chore: disable e2e in ci

This commit is contained in:
zhom
2026-07-31 22:50:18 +04:00
parent c0ecda69c1
commit a3737b39ce
4 changed files with 26 additions and 387 deletions
-248
View File
@@ -1,248 +0,0 @@
name: App E2E Tests
on:
workflow_call:
inputs:
smoke_only:
description: Run the cross-platform pull-request smoke matrix
required: false
default: true
type: boolean
secrets:
WAYFERN_TEST_TOKEN:
description: Token used by the full Wayfern integration suite
required: false
RESIDENTIAL_PROXY_URL_ONE_SOCKS:
description: SOCKS5 residential proxy used by the network suite
required: false
RESIDENTIAL_PROXY_URL_ONE_HTTP:
description: HTTP residential proxy used by the network suite
required: false
workflow_dispatch:
inputs:
suite:
description: E2E suite to run
required: false
default: full
type: choice
options:
- full
- smoke
- ui
- entities
- network
- integrations
- sync
- browser
push:
branches: ["main"]
schedule:
- cron: "17 3 * * 1"
permissions:
contents: read
jobs:
smoke:
name: Smoke (${{ matrix.os }})
if: ${{ inputs.smoke_only == true }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- name: Disable git core.autocrlf on Windows
if: runner.os == 'Windows'
run: git config --global core.autocrlf false
- name: Checkout Donut Browser
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
run_install: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .node-version
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
with:
toolchain: stable
- name: Cache Rust dependencies
uses: swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: |
src-tauri -> target
e2e/app -> target
- name: Cache WebDriver test driver
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: e2e/.driver
key: tauri-wd-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('e2e/app/Cargo.lock') }}
- name: Install Tauri dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev xvfb openvpn
- name: Install app dependencies
run: pnpm install --frozen-lockfile
- name: Run isolated smoke suite
shell: bash
run: |
if [[ "${RUNNER_OS}" == "Linux" ]]; then
xvfb-run -a pnpm e2e:smoke
else
pnpm e2e:smoke
fi
- name: Upload E2E diagnostics
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: app-e2e-smoke-${{ matrix.os }}
path: ${{ runner.temp }}/donut-e2e-*/diagnostics/**
if-no-files-found: ignore
retention-days: 7
full:
name: Full UI, sync, encryption, and Wayfern
if: ${{ inputs.smoke_only != true && inputs.suite != 'network' }}
runs-on: macos-latest
timeout-minutes: 40
steps:
- name: Checkout Donut Browser
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
run_install: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .node-version
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
with:
toolchain: stable
- name: Cache Rust dependencies
uses: swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: |
src-tauri -> target
e2e/app -> target
- name: Cache WebDriver test driver
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: e2e/.driver
key: tauri-wd-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('e2e/app/Cargo.lock') }}
- name: Install app dependencies
run: pnpm install --frozen-lockfile
- name: Run full isolated app suite
env:
DONUT_E2E_SUITE: ${{ inputs.suite || 'full' }}
DONUT_E2E_SKIP_NETWORK_TEST: "1"
WAYFERN_TEST_TOKEN: ${{ secrets.WAYFERN_TEST_TOKEN }}
run: node e2e/run.mjs "--suite=${DONUT_E2E_SUITE}"
- name: Upload E2E diagnostics
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: app-e2e-full-macos
path: ${{ runner.temp }}/donut-e2e-*/diagnostics/**
if-no-files-found: ignore
retention-days: 7
network:
name: Real proxy and local WireGuard browser traffic
if: ${{ inputs.smoke_only != true && (inputs.suite == '' || inputs.suite == 'full' || inputs.suite == 'network') }}
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Checkout Donut Browser
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
run_install: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .node-version
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # master
with:
toolchain: stable
- name: Cache Rust dependencies
uses: swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
workspaces: |
src-tauri -> target
e2e/app -> target
- name: Cache WebDriver test driver
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: e2e/.driver
key: tauri-wd-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('e2e/app/Cargo.lock') }}
- name: Install Tauri dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev patchelf libxdo-dev xvfb openvpn
- name: Install app dependencies
run: pnpm install --frozen-lockfile
- name: Run isolated real-network suite
env:
WAYFERN_TEST_TOKEN: ${{ secrets.WAYFERN_TEST_TOKEN }}
RESIDENTIAL_PROXY_URL_ONE_SOCKS: ${{ secrets.RESIDENTIAL_PROXY_URL_ONE_SOCKS }}
RESIDENTIAL_PROXY_URL_ONE_HTTP: ${{ secrets.RESIDENTIAL_PROXY_URL_ONE_HTTP }}
run: xvfb-run -a pnpm e2e:network
- name: Upload E2E diagnostics
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: app-e2e-network-linux
path: ${{ runner.temp }}/donut-e2e-*/diagnostics/**
if-no-files-found: ignore
retention-days: 7
+5 -20
View File
@@ -36,35 +36,20 @@ jobs:
--lockfile=src-tauri/Cargo.lock
./
sync-e2e:
name: Sync E2E Tests
uses: ./.github/workflows/sync-e2e.yml
permissions:
contents: read
app-e2e:
name: Cross-platform App E2E
uses: ./.github/workflows/app-e2e.yml
secrets:
WAYFERN_TEST_TOKEN: ${{ secrets.WAYFERN_TEST_TOKEN }}
permissions:
contents: read
# E2E suites deliberately do not run here. They need real credentials, Docker,
# and a desktop session, which CI could not supply reliably. They are run
# locally instead; see the E2E section of AGENTS.md.
pr-status:
name: PR Status Check
runs-on: ubuntu-latest
needs: [lint-js, lint-rust, security-scan, sync-e2e, app-e2e]
needs: [lint-js, lint-rust, security-scan]
if: always()
steps:
- name: Check all jobs succeeded
run: |
if [[ "${{ needs.lint-js.result }}" != "success" || "${{ needs.lint-rust.result }}" != "success" || "${{ needs.security-scan.result }}" != "success" || "${{ needs.app-e2e.result }}" != "success" ]]; then
if [[ "${{ needs.lint-js.result }}" != "success" || "${{ needs.lint-rust.result }}" != "success" || "${{ needs.security-scan.result }}" != "success" ]]; then
echo "One or more checks failed"
exit 1
fi
# sync-e2e is optional (only runs when sync-related files change)
if [[ "${{ needs.sync-e2e.result }}" == "failure" ]]; then
echo "Sync E2E tests failed"
exit 1
fi
echo "All checks passed!"
-119
View File
@@ -1,119 +0,0 @@
name: Sync E2E Tests
on:
pull_request:
branches: ["main"]
paths:
- "donut-sync/**"
- "src-tauri/src/sync/**"
- "scripts/sync-test-harness.mjs"
- ".github/workflows/sync-e2e.yml"
push:
branches: ["main"]
paths:
- "donut-sync/**"
- "src-tauri/src/sync/**"
- "scripts/sync-test-harness.mjs"
workflow_call:
workflow_dispatch:
permissions:
contents: read
jobs:
rust-sync-e2e:
name: Rust Sync E2E Tests
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 #v6.0.9
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "22"
cache: "pnpm"
- name: Install Rust
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 #master
with:
toolchain: stable
- name: Cache Rust dependencies
uses: swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 #v2.9.1
with:
workspaces: "src-tauri"
- name: Install Tauri dependencies (Ubuntu only)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf libxdo-dev
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Rust sync e2e tests with harness
run: node scripts/sync-test-harness.mjs
donut-sync-e2e:
name: donut-sync Node.js E2E Tests
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Start MinIO
run: |
docker run -d --name minio \
-p 8987:9000 \
-e MINIO_ROOT_USER=minioadmin \
-e MINIO_ROOT_PASSWORD=minioadmin \
minio/minio:latest server /data
# Wait for MinIO to be ready
for i in {1..30}; do
if curl -sf http://127.0.0.1:8987/minio/health/live; then
echo "MinIO is ready"
break
fi
echo "Waiting for MinIO... ($i/30)"
sleep 2
done
- name: Install pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 #v6.0.9
with:
run_install: false
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "22"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run donut-sync Node.js e2e tests
working-directory: donut-sync
env:
SYNC_TOKEN: test-sync-token
S3_ENDPOINT: http://127.0.0.1:8987
S3_ACCESS_KEY_ID: minioadmin
S3_SECRET_ACCESS_KEY: minioadmin
S3_BUCKET: donut-sync-test
S3_FORCE_PATH_STYLE: "true"
run: pnpm test:e2e
+21
View File
@@ -91,6 +91,12 @@ donutbrowser/
### Native app E2E tests are mandatory for affected behavior
**No E2E suite runs in CI. You are the only thing that runs them.** The `app-e2e` and
`sync-e2e` workflows were removed because they need real credentials, Docker, and a desktop
session that hosted runners could not supply reliably; a permanently red check is worse than
no check. Nothing downstream will catch an E2E regression for you, so skipping the affected
suite means shipping it unverified. Report explicitly which suites you ran and which you did not.
The native suites use the published `tauri-wd` driver (pinned in `e2e/app/Cargo.toml`, installed
into the ignored `e2e/.driver` root) and launch an `e2e`-feature build.
Every session gets its own temporary Donut data/cache/log root, home directory,
@@ -109,6 +115,7 @@ suite passes:
| REST API/OpenAPI, MCP, cloud/update contracts, team locks, real-time synchronizer | `pnpm e2e:integrations` |
| Sync client/server, manifests, timestamps, deletion, encryption, password rollover | `pnpm e2e:sync` |
| Wayfern download/terms/fingerprint, browser runner, CDP, automation endpoints, process cleanup | `pnpm e2e:browser` |
| `donut-sync/` server code (controllers, services, auth, S3 endpoints) | `pnpm --filter donut-sync test:e2e` against a local MinIO |
| E2E harness, WebDriver plugin/driver, app isolation hooks, or changes spanning multiple rows | Run every affected row; use `pnpm e2e` for cross-cutting changes |
`e2e:browser` requires `WAYFERN_TEST_TOKEN` in the environment or local `.env`. `e2e:network`
@@ -118,6 +125,20 @@ and the full suite additionally require Docker plus `RESIDENTIAL_PROXY_URL_ONE_H
Keep failed artifacts and inspect the per-session app/driver logs and screenshot before changing
assertions.
The `donut-sync` row is the one suite the root `pnpm test` does not cover (`test:sync-e2e` runs
the Rust sync harness only). It needs a MinIO on port 8987:
```bash
docker run -d --rm --name minio -p 8987:9000 \
-e MINIO_ROOT_USER=minioadmin -e MINIO_ROOT_PASSWORD=minioadmin \
minio/minio:latest server /data
SYNC_TOKEN=test-sync-token S3_ENDPOINT=http://127.0.0.1:8987 \
S3_ACCESS_KEY_ID=minioadmin S3_SECRET_ACCESS_KEY=minioadmin \
S3_BUCKET=donut-sync-test S3_FORCE_PATH_STYLE=true \
pnpm --filter donut-sync test:e2e
docker rm -f minio
```
When adding a Tauri command, assign it exactly once in `e2e/coverage-map.mjs` and add executable
evidence to the owning suite. `e2e:smoke` fails if command registration and the coverage map drift.