validate-test-suites.yml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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: 'evals/framework/package-lock.json'
  29. - name: Install dependencies
  30. run: |
  31. cd evals/framework
  32. npm ci
  33. - name: Validate all test suites
  34. run: |
  35. cd evals/framework
  36. npm run validate:suites:all
  37. - name: Comment on PR (if validation failed)
  38. if: failure() && github.event_name == 'pull_request'
  39. uses: actions/github-script@v7
  40. with:
  41. script: |
  42. github.rest.issues.createComment({
  43. issue_number: context.issue.number,
  44. owner: context.repo.owner,
  45. repo: context.repo.repo,
  46. body: '❌ **Test Suite Validation Failed**\n\nPlease check the test suite JSON files for errors. Run `npm run validate:suites` locally to see details.'
  47. })
  48. - name: Upload validation report
  49. if: always()
  50. uses: actions/upload-artifact@v4
  51. with:
  52. name: suite-validation-report
  53. path: |
  54. evals/agents/*/config/**/*.json
  55. scripts/validation/validate-test-suites.sh
  56. retention-days: 7