mirror of
https://github.com/vee1e/bulk-questionnaire-upload.git
synced 2026-09-01 09:50:06 +00:00
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: Deployed Performance Metrics CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
paths:
|
|
- 'backend/**'
|
|
- 'tests/backend/**'
|
|
- 'scripts/**'
|
|
- '.github/workflows/perf.yml'
|
|
|
|
jobs:
|
|
perf-metrics:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
environment: Test
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install httpx pandas openpyxl
|
|
|
|
- name: Measure deployed performance
|
|
env:
|
|
BACKEND_URL: https://bulk-api.lverma.com
|
|
run: python scripts/measure_perf.py
|
|
|
|
- name: Update README metrics table
|
|
run: python scripts/update_readme_metrics.py
|
|
|
|
- name: Commit updated README
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git add README.md
|
|
if git diff --cached --quiet; then
|
|
echo "No changes to README metrics."
|
|
else
|
|
git commit -m "chore: update performance metrics from CI [skip ci]"
|
|
git push
|
|
fi
|