validate-test-suites.yml 2.3 KB

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