validate-test-suites.yml 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: Validate Test Suites
  2. on:
  3. push:
  4. paths:
  5. - 'evals/agents/*/config/**/*.json'
  6. - 'evals/agents/*/tests/**/*.yaml'
  7. - 'scripts/validation/validate-test-suites.sh'
  8. - '.github/workflows/validate-test-suites.yml'
  9. pull_request:
  10. paths:
  11. - 'evals/agents/*/config/**/*.json'
  12. - 'evals/agents/*/tests/**/*.yaml'
  13. - 'scripts/validation/validate-test-suites.sh'
  14. - '.github/workflows/validate-test-suites.yml'
  15. workflow_dispatch:
  16. jobs:
  17. validate:
  18. name: Validate Test Suite Definitions
  19. runs-on: ubuntu-latest
  20. steps:
  21. - name: Checkout code
  22. uses: actions/checkout@v4
  23. - name: Setup Node.js
  24. uses: actions/setup-node@v4
  25. with:
  26. node-version: '20'
  27. cache: 'npm'
  28. cache-dependency-path: 'package-lock.json'
  29. - name: Install dependencies
  30. run: |
  31. npm ci
  32. - name: Validate all test suites
  33. run: |
  34. cd evals/framework
  35. npm run validate:suites:all
  36. - name: Comment on PR (if validation failed)
  37. if: failure() && github.event_name == 'pull_request'
  38. uses: actions/github-script@v7
  39. with:
  40. script: |
  41. github.rest.issues.createComment({
  42. issue_number: context.issue.number,
  43. owner: context.repo.owner,
  44. repo: context.repo.repo,
  45. body: '❌ **Test Suite Validation Failed**\n\nPlease check the test suite JSON files for errors. Run `npm run validate:suites` locally to see details.'
  46. })
  47. - name: Upload validation report
  48. if: always()
  49. uses: actions/upload-artifact@v4
  50. with:
  51. name: suite-validation-report
  52. path: |
  53. evals/agents/*/config/**/*.json
  54. scripts/validation/validate-test-suites.sh
  55. retention-days: 7