Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/test-lifecycle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Test ObjectDocs Lifecycle

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:

jobs:
test-quick:
name: Quick Build Test
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: '10.x'

- name: Install dependencies
run: pnpm install

- name: Run quick build test
run: pnpm test:quick

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: quick-test-results
path: /tmp/objectdocs-*.log
retention-days: 7
if-no-files-found: ignore

test-full:
name: Full Lifecycle Test
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: '10.x'

- name: Install dependencies
run: pnpm install

- name: Run full lifecycle test
run: pnpm test:site

- name: Upload server logs
if: always()
uses: actions/upload-artifact@v4
with:
name: full-test-results
path: /tmp/objectdocs-*.log
retention-days: 7
if-no-files-found: ignore
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ next-env.d.ts
.next

# objectdocs
content/.objectdocs
content/.objectdocs

# test artifacts
/tmp/objectdocs-test-*
/tmp/dev-server.log
/tmp/start-server.log
46 changes: 46 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# ObjectDocs Development Tasks
# Run with: make <target> or pnpm run <script>

.PHONY: help install dev build test test-quick test-full clean

# Default target
help:
@echo "ObjectDocs Development Tasks"
@echo ""
@echo "Available targets:"
@echo " install - Install all dependencies"
@echo " dev - Start development server"
@echo " build - Build the site"
@echo " test - Run all tests"
@echo " test-quick - Run quick build test"
@echo " test-full - Run full lifecycle test"
@echo " clean - Clean build artifacts"
@echo ""

install:
pnpm install

dev:
pnpm dev

build:
pnpm build

test: test-quick test-full

test-quick:
@echo "Running quick build test..."
bash test-quick.sh

test-full:
@echo "Running full lifecycle test..."
bash test-site.sh

clean:
rm -rf node_modules
rm -rf .next
rm -rf content/.objectdocs
rm -rf packages/*/node_modules
rm -rf examples/*/node_modules
find . -name ".next" -type d -exec rm -rf {} + 2>/dev/null || true
find . -name "*.tsbuildinfo" -delete 2>/dev/null || true
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,20 @@ This repository is a monorepo managed by pnpm workspaces:

- **[examples/starter](./examples/starter)**: A complete starter template demonstrating the recommended project structure. Includes comprehensive documentation on architecture, testing, and deployment guides. Ready for production use on Vercel and other platforms.

## 🧪 Testing

ObjectDocs includes comprehensive test scripts to validate the complete lifecycle:

```bash
# Quick build test (recommended for CI)
pnpm test:quick

# Full lifecycle test (includes server startup tests)
pnpm test:site
```

See [TESTING.md](./TESTING.md) for detailed testing documentation.

## 🤝 Contributing

Contributions are welcome! Please read our [Contributing Guide](./CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
Expand Down
Loading
Loading