Refactor: Complete architectural restructuring from monolithic to mod… #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: TaskTracker Tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| security_test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '16' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run security tests | |
| run: node tests/run-tests.js security | |
| unit_test: | |
| runs-on: ubuntu-latest | |
| needs: security_test | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '16' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run unit tests | |
| run: node tests/run-tests.js unit | |
| integration_test: | |
| runs-on: ubuntu-latest | |
| needs: unit_test | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '16' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run integration tests | |
| run: node tests/run-tests.js integration | |
| performance_test: | |
| runs-on: ubuntu-latest | |
| needs: integration_test | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '16' | |
| cache: 'npm' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run performance tests | |
| run: node tests/run-tests.js performance | |
| documentation_check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check documentation structure | |
| run: | | |
| # Verify main documentation files exist | |
| for dir in docs/user-guides docs/dev-reference docs/ai-integration; do | |
| if [ ! -f "$dir/README.md" ]; then | |
| echo "Missing README.md in $dir" | |
| exit 1 | |
| fi | |
| done | |
| # Verify architecture documentation exists | |
| if [ ! -f "docs/dev-docs/ARCHITECTURE.md" ]; then | |
| echo "Missing architecture documentation" | |
| exit 1 | |
| fi | |
| # Verify CLI reference exists | |
| if [ ! -f "docs/dev-reference/cli-reference.md" ]; then | |
| echo "Missing CLI reference documentation" | |
| exit 1 | |
| fi | |
| echo "✅ Documentation structure verified" | |
| template_check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check for templates | |
| run: | | |
| # Ensure Claude templates exist | |
| if [ ! -d "docs/dev-docs/claude-templates" ]; then | |
| echo "Claude templates directory not found" | |
| exit 1 | |
| fi | |
| # Check for required template files | |
| required_templates=("daily-update.txt" "task-create.txt" "pr-prepare.txt") | |
| for template in "${required_templates[@]}"; do | |
| if [ ! -f "docs/dev-docs/claude-templates/$template" ]; then | |
| echo "Template file $template not found" | |
| exit 1 | |
| fi | |
| done | |
| echo "✅ All required templates found" | |
| structure_check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Verify repository structure | |
| run: | | |
| # Check for core lib structure | |
| for dir in lib/core lib/commands; do | |
| if [ ! -d "$dir" ]; then | |
| echo "Missing directory: $dir" | |
| exit 1 | |
| fi | |
| done | |
| # Check for command registry | |
| if [ ! -f "lib/commands/index.js" ]; then | |
| echo "Missing command registry" | |
| exit 1 | |
| fi | |
| # Check for core modules | |
| core_modules=("task-manager.js" "config-manager.js" "formatting.js" "cli-parser.js") | |
| for module in "${core_modules[@]}"; do | |
| if [ ! -f "lib/core/$module" ]; then | |
| echo "Missing core module: $module" | |
| exit 1 | |
| fi | |
| done | |
| # Verify monolithic script is gone | |
| if [ -f "lib/core/tasktracker.js" ]; then | |
| echo "Error: Monolithic script still exists" | |
| exit 1 | |
| fi | |
| echo "✅ Repository structure verified" |