Files
semantica/.github/workflows/benchmark.yml
T
KaifAhmad1andClaude Sonnet 4.6 1d88c06cbb fix(security): resolve CodeQL alerts for logging, URL sanitization, and workflow permissions
- Remove api_key debug print blocks from relation_extractor.py and triplet_extractor.py (CWE-532 clear-text logging)
- Replace URL substring check with exact equality in test_web_ingestor.py (CWE-20 incomplete sanitization)
- Add `permissions: contents: read` to benchmark.yml and security.yml workflows (least-privilege)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-30 19:46:30 +05:30

59 lines
1.5 KiB
YAML

name: Semantica Performance Suite
on:
push:
branches: [main]
paths-ignore:
- 'docs/**'
- 'mkdocs.yml'
- 'requirements-docs.txt'
- '**/*.md'
workflow_dispatch:
permissions:
contents: read
jobs:
performance-test:
name: Benchmark Runner (Ubuntu/Python 3.12)
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: 'pip'
- name: Install Dependencies
env:
BENCHMARK_REAL_LIBS: "1"
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r benchmarks/requirements.txt
python -m spacy download en_core_web_sm
pip install rdflib neo4j faiss-cpu torch pyarrow pdfplumber python-pptx openpyxl lxml python-docx beautifulsoup4 chardet langdetect
- name: Execute Benchmarks (Real Mode)
env:
BENCHMARK_REAL_LIBS: "1"
run: |
python benchmarks/benchmarks_runner.py
# Optional: Compare to baseline (requires previous run artifact)
# pytest-benchmark --storage file://benchmarks/results --benchmark-compare
- name: Upload Benchmark Results
uses: actions/upload-artifact@v7
if: always()
with:
name: benchmark-report-${{ github.run_id }}
path: benchmarks/results
retention-days: 30