| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- 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
|