add validation for graders on ci #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Validate graders | |
| on: | |
| pull_request: | |
| paths: | |
| - "graders/**" | |
| - "scripts/validate_grader.py" | |
| - "scripts/test_input.json" | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: pip install agentevals-grader-sdk pyyaml | |
| - name: Discover and validate all graders | |
| run: | | |
| grader_dirs=$(find graders -mindepth 1 -maxdepth 1 -type d | sort) | |
| if [ -z "$grader_dirs" ]; then | |
| echo "No grader directories found." | |
| exit 0 | |
| fi | |
| python scripts/validate_grader.py $grader_dirs |