diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f66c64..4ca4771 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: run: pnpm install - name: Install Playwright - run: pnpm exec playwright install --with-deps chromium + run: pnpm run test:setup:ci - name: Lint run: pnpm run lint diff --git a/AGENTS.md b/AGENTS.md index 3048218..5445ed7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,7 +14,7 @@ This project targets Vue 3 + TypeScript with ECMAScript modules. Follow the exis ## Testing Guidelines -For complete and up-to-date testing and CI guidance, see `tests/TESTING.md`. +For complete and up-to-date testing and CI guidance, see [`tests/TESTING.md`](tests/TESTING.md). ## Commit & Pull Request Guidelines diff --git a/README.md b/README.md index 9143acc..1542cde 100644 --- a/README.md +++ b/README.md @@ -436,6 +436,8 @@ pnpm dev Open `http://localhost:5173` to see the demo. +For testing and CI details, see [`tests/TESTING.md`](tests/TESTING.md). + ## Notice The Apache Software Foundation [Apache ECharts, ECharts](https://echarts.apache.org/), Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the [Apache Software Foundation](https://www.apache.org/). diff --git a/README.zh-Hans.md b/README.zh-Hans.md index d5b5a83..b3e4dd6 100644 --- a/README.zh-Hans.md +++ b/README.zh-Hans.md @@ -436,6 +436,8 @@ pnpm dev 打开 `http://localhost:5173` 来查看 demo。 +更多测试与 CI 说明请参见 [`tests/TESTING.md`](tests/TESTING.md)。 + ## 声明 The Apache Software Foundation [Apache ECharts, ECharts](https://echarts.apache.org/), Apache, the Apache feather, and the Apache ECharts project logo are either registered trademarks or trademarks of the [Apache Software Foundation](https://www.apache.org/). diff --git a/package.json b/package.json index 7f1af92..d323819 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,8 @@ "dev:build": "vite build", "dev:preview": "vite preview", "dev:typecheck": "vue-tsc -p ./demo", + "test:setup": "playwright install chromium", + "test:setup:ci": "playwright install --with-deps chromium", "docs": "jiti ./scripts/docs.ts", "release": "bumpp --execute \"pnpm run docs\" --all", "test": "vitest run", diff --git a/tests/TESTING.md b/tests/TESTING.md index b19a503..ec34489 100644 --- a/tests/TESTING.md +++ b/tests/TESTING.md @@ -10,7 +10,7 @@ We run Vitest in browser mode using Playwright (Chromium) with `vitest-browser-v ## Run locally - Install dependencies: `pnpm install` -- Install Chromium: `pnpm exec playwright install chromium` +- Install Chromium: `pnpm test:setup` - Run tests: `pnpm test` - Coverage (V8): `pnpm test:coverage` - HTML report: `coverage/browser/index.html`