mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
788b069c02
## Changes ### E2E Test Suite (~52 test cases) - public-commands.test.ts — Public API commands (hackernews, v2ex) - browser-public.test.ts — Browser commands for public data across all sites - browser-auth.test.ts — Graceful failure verification for login-required commands - management.test.ts — Full coverage of management commands - output-formats.test.ts — Output format validation (json/yaml/csv/md) - smoke/api-health.test.ts — Scheduled API health checks ### Auto-detect Browser Mode - buildMcpArgs uses CI env var to select mode: - Local (no CI) → --extension (connect to user's Chrome) - CI → standalone (launches its own browser) ### CI Pipeline - e2e-headed.yml — Real Chrome via setup-chrome + xvfb in headed mode - ci.yml — build + unit-test (2 shards) + smoke-test (scheduled/manual) - Composite action for shared Chrome + xvfb setup ### Documentation - New TESTING.md — Architecture, coverage, local setup, how to add tests Co-authored-by: AlexYue <yj976240184@qq.com>
27 lines
741 B
YAML
27 lines
741 B
YAML
name: Setup Chrome + xvfb
|
|
description: Install real Chrome and xvfb virtual display for headed browser testing
|
|
|
|
outputs:
|
|
chrome-path:
|
|
description: Path to the installed Chrome binary
|
|
value: ${{ steps.setup-chrome.outputs.chrome-path }}
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install real Chrome (stable)
|
|
uses: browser-actions/setup-chrome@v1
|
|
id: setup-chrome
|
|
with:
|
|
chrome-version: stable
|
|
|
|
- name: Verify Chrome installation
|
|
shell: bash
|
|
run: |
|
|
echo "Chrome path: ${{ steps.setup-chrome.outputs.chrome-path }}"
|
|
${{ steps.setup-chrome.outputs.chrome-path }} --version
|
|
|
|
- name: Install xvfb for headed mode
|
|
shell: bash
|
|
run: sudo apt-get install -y xvfb
|