validate-test-suites.yml 2.0 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. permissions:
  17. contents: read
  18. jobs:
  19. validate:
  20. name: Validate Test Suite Definitions
  21. runs-on: ubuntu-latest
  22. steps:
  23. - name: Checkout code
  24. uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
  25. with:
  26. persist-credentials: false
  27. - name: Setup Node.js
  28. uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
  29. with:
  30. node-version: '20'
  31. cache: 'npm'
  32. cache-dependency-path: 'package-lock.json'
  33. - name: Install dependencies
  34. run: |
  35. npm ci
  36. - name: Validate all test suites
  37. run: |
  38. cd evals/framework
  39. npm run validate:suites:all
  40. # NOTE: A "Comment on PR (if validation failed)" step was removed here.
  41. # It called github.rest.issues.createComment, which needs `issues: write`.
  42. # This workflow is fork-reachable (pull_request) and intentionally runs with
  43. # a read-only token, so the step would 403; and for fork PRs GitHub forces a
  44. # read-only token regardless, so it could never work there. A validation
  45. # failure is already surfaced as a failed check plus the uploaded report.
  46. - name: Upload validation report
  47. if: always()
  48. uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
  49. with:
  50. name: suite-validation-report
  51. path: |
  52. evals/agents/*/config/**/*.json
  53. scripts/validation/validate-test-suites.sh
  54. retention-days: 7