OpenWriterControle/.github/workflows/test-agents.yml
darrenhinde aebd68e046 feat: add monorepo structure with versioning and CI/CD
Monorepo Features:
- Root package.json with convenient npm scripts for all agents
- Easy testing from root: npm test, npm run test:openagent, npm run test:opencoder
- Multi-model support: test with Grok, Claude, or GPT-4
- Quick dashboard access: npm run dashboard
- No folder navigation required

Versioning System:
- VERSION file tracking current version (0.1.0-alpha.1)
- CHANGELOG.md with comprehensive version history
- Version bump scripts for alpha, beta, rc, and stable releases
- Semantic versioning with progression: Alpha → Beta → RC → Stable

CI/CD:
- GitHub Actions workflow for automated testing
- Pre-merge validation for agent changes
- Smoke tests for both openagent and opencoder
- Automated test result reporting
- Runs on PRs to main/dev and pushes to main

Helper Scripts:
- scripts/test.sh: Advanced test runner with multi-agent support
- scripts/dashboard.sh: Enhanced dashboard launcher with auto-open
- scripts/bump-version.sh: Version management tool

Documentation:
- QUICK_START.md: Comprehensive testing and usage guide
- Clear examples for all test scenarios
- Multi-agent and multi-model workflows

Benefits:
- Easy testing from root directory
- Automated quality checks before merges
- Clear version tracking and history
- Developer-friendly workflows
- No breaking changes to existing structure
2025-11-26 21:49:50 +00:00

128 lines
3.3 KiB
YAML

name: Test Agents
on:
pull_request:
branches: [ main, dev ]
paths:
- '.opencode/agent/**'
- 'evals/**'
- '.github/workflows/test-agents.yml'
push:
branches: [ main ]
workflow_dispatch:
jobs:
test-openagent:
name: Test OpenAgent
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'evals/framework/package-lock.json'
- name: Install dependencies
run: |
cd evals/framework
npm ci
- name: Build framework
run: |
cd evals/framework
npm run build
- name: Run OpenAgent smoke test
run: npm run test:ci:openagent
env:
CI: true
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: openagent-results
path: evals/results/
retention-days: 30
test-opencoder:
name: Test OpenCoder
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: 'evals/framework/package-lock.json'
- name: Install dependencies
run: |
cd evals/framework
npm ci
- name: Build framework
run: |
cd evals/framework
npm run build
- name: Run OpenCoder smoke test
run: npm run test:ci:opencoder
env:
CI: true
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: opencoder-results
path: evals/results/
retention-days: 30
report-results:
name: Report Test Results
runs-on: ubuntu-latest
needs: [test-openagent, test-opencoder]
if: always()
steps:
- name: Download OpenAgent results
uses: actions/download-artifact@v4
with:
name: openagent-results
path: results/openagent
continue-on-error: true
- name: Download OpenCoder results
uses: actions/download-artifact@v4
with:
name: opencoder-results
path: results/opencoder
continue-on-error: true
- name: Display results summary
run: |
echo "## Test Results Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ -f results/openagent/latest.json ]; then
echo "### OpenAgent" >> $GITHUB_STEP_SUMMARY
cat results/openagent/latest.json | jq -r '"- Passed: \(.passed)\n- Failed: \(.failed)\n- Total: \(.total)"' >> $GITHUB_STEP_SUMMARY
fi
if [ -f results/opencoder/latest.json ]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "### OpenCoder" >> $GITHUB_STEP_SUMMARY
cat results/opencoder/latest.json | jq -r '"- Passed: \(.passed)\n- Failed: \(.failed)\n- Total: \(.total)"' >> $GITHUB_STEP_SUMMARY
fi