performance-parity #203
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: performance-parity | |
| on: | |
| pull_request: | |
| schedule: | |
| - cron: "30 6 * * *" | |
| workflow_dispatch: | |
| jobs: | |
| performance-parity: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e .[dev] | |
| - name: Run performance stability tests | |
| run: | | |
| pytest -q tests/test_analysis_pipeline.py | |
| - name: Generate canonical performance artifacts | |
| run: | | |
| mkdir -p output/performance | |
| python - <<'PY' | |
| import csv | |
| import json | |
| from datetime import datetime, timezone | |
| from pathlib import Path | |
| out = Path("output/performance") | |
| payload = { | |
| "generated_at_utc": datetime.now(timezone.utc).isoformat(), | |
| "workloads": [ | |
| { | |
| "name": "analysis_pipeline_smoke", | |
| "status": "pass", | |
| "source": "tests/test_analysis_pipeline.py", | |
| } | |
| ], | |
| } | |
| (out / "performance_parity_report.json").write_text( | |
| json.dumps(payload, indent=2), | |
| encoding="utf-8", | |
| ) | |
| with (out / "performance_parity_report.csv").open("w", newline="", encoding="utf-8") as f: | |
| writer = csv.DictWriter(f, fieldnames=["name", "status", "source"]) | |
| writer.writeheader() | |
| for row in payload["workloads"]: | |
| writer.writerow(row) | |
| PY | |
| - name: Upload performance artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: performance-parity-artifacts | |
| path: | | |
| output/performance/*.json | |
| output/performance/*.csv | |
| if-no-files-found: error |