Add Evidence Package Generation Script #464
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: 5D Tests & Validation | |
| permissions: | |
| contents: read | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| 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 -r requirements_extended.txt | |
| pip install pytest pytest-cov pydantic pyyaml fuzzywuzzy python-Levenshtein PyPDF2 | |
| - name: Run Tests | |
| run: pytest -v --cov=. --cov-report=xml | |
| - name: Validate JSON Schema (optional) | |
| run: | | |
| python - << 'PY' | |
| import json | |
| from models.schemas import Solutions | |
| try: | |
| with open('5d_solutions.json', 'r', encoding='utf-8') as f: | |
| data = json.load(f) | |
| Solutions(**data) | |
| except FileNotFoundError: | |
| print('No 5d_solutions.json present; skipping validation.') | |
| PY |