Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 22, 2026

Implements automated testing for the complete ObjectDocs workflow: initialization → content creation → dev server → build → production server.

Test Scripts

  • test-site.sh - Full E2E test with HTTP validation (~3-4 min)

    • Spawns dev/prod servers, validates HTTP accessibility
    • Graceful termination: SIGTERM → SIGKILL cascade
    • Configurable via PORT, BUILD_TIMEOUT, DEV_TIMEOUT env vars
  • test-quick.sh - Build-only validation for CI (~1-2 min)

    • No server startup, focuses on build success
    • Minimal output for CI pipelines

Both scripts use mktemp for secure temp dirs, auto-detect monorepo vs npm install context, and fallback for macOS (no timeout command).

Integration

# Package scripts
pnpm test:quick    # CI-friendly build test
pnpm test:site     # Full lifecycle with servers

# Makefile convenience
make test-quick
make test-full
make test          # Runs both

# Custom config
PORT=8888 BUILD_TIMEOUT=600 pnpm test:site

CI/CD

GitHub Actions workflow (.github/workflows/test-lifecycle.yml) runs both test modes on push/PR, uploads logs as artifacts.

Documentation

  • TESTING.md / TESTING.zh-CN.md - Test guides (EN/CN)
  • Includes troubleshooting, manual test checklists, cross-platform notes
Original prompt

编写测试脚本测试站点,初始化创建启动运行编译的完整过程


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link

vercel bot commented Jan 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
objectdocs-site Ready Ready Preview, Comment Jan 22, 2026 5:42am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Add test scripts for site initialization and build process Add end-to-end lifecycle test scripts for ObjectDocs Jan 22, 2026
Copilot AI requested a review from hotlong January 22, 2026 05:30
@github-actions github-actions bot added documentation Improvements or additions to documentation workflows dependencies labels Jan 22, 2026
@github-actions
Copy link

🚀 Preview Deployment

This pull request will be automatically deployed to Vercel.

Preview Links

  • 📝 Documentation: Will be available once Vercel deployment completes
  • 🌍 Languages: English (/en/docs) and Chinese (/cn/docs)

Build Status

Check the CI workflow for build status and any errors.


Automated preview information for PR #30

@huangyiirene huangyiirene marked this pull request as ready for review January 22, 2026 05:42
@huangyiirene huangyiirene merged commit b861da9 into main Jan 22, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies documentation Improvements or additions to documentation workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants