forked from hect0x7/JMComic-Crawler-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 1.3 KB
/
Copy pathbenchmark.yml
File metadata and controls
56 lines (48 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Async Benchmark
on:
push:
branches: [ main, master ]
paths:
- '**/*async*.py'
- '.github/workflows/benchmark.yml'
pull_request:
branches: [ main, master ]
paths:
- '**/*async*.py'
- '.github/workflows/benchmark.yml'
workflow_dispatch:
jobs:
benchmark:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Run Performance Benchmark
env:
PYTHONPATH: ${{ github.workspace }}/src
no_proxy: '*'
run: python usage/benchmark_async_vs_sync.py
- name: Publish Report to Step Summary
if: always()
run: |
if [ -f PERFORMANCE_REPORT.md ]; then
cat PERFORMANCE_REPORT.md >> $GITHUB_STEP_SUMMARY
else
echo "❌ PERFORMANCE_REPORT.md not generated" >> $GITHUB_STEP_SUMMARY
fi
- name: Upload Benchmark Report
if: always()
uses: actions/upload-artifact@v4
with:
name: benchmark-report
path: PERFORMANCE_REPORT.md
if-no-files-found: warn