-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (75 loc) · 2.5 KB
/
Copy pathbenchmarks.yml
File metadata and controls
90 lines (75 loc) · 2.5 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Perform Benchmarks
on:
push:
branches:
- main
- develop
pull_request_target:
branches:
- main
- develop
concurrency:
group: benchmarks-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
BRANCH_NAME: ${{ github.base_ref || github.ref_name }}
PUSH_TO_BENCHMARKS: false
COMMENT_ALWAYS: true
jobs:
benchmark-then-upload:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v3
id: cls-python-workflow-token
with:
app-id: ${{ secrets.CLS_PYTHON_WORKFLOW_CLIENT_ID }}
private-key: ${{ secrets.CLS_PYTHON_WORKFLOW_PRIVATE_KEY }}
repositories: |
cosy-luigi
cosy-luigi-benchmarks
- uses: actions/checkout@v7
with:
repository: cls-python/cosy-luigi-benchmarks
ref: 'gh-pages'
- uses: actions/checkout@v7
with:
# Full history for timestamps
fetch-depth: 0
path: 'cosy-luigi-nested'
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: '3.13'
- name: Install Hatch
uses: pypa/hatch@install
- name: Fetch PR branch from fork
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
run: gh pr checkout ${{ github.event.number }}
env:
GH_TOKEN: ${{ steps.cls-python-workflow-token.outputs.token }}
working-directory: 'cosy-luigi-nested'
- name: Run Benchmark Suite
run: hatch test benchmarks --benchmark-json benchmarks.json
working-directory: 'cosy-luigi-nested'
- name: Config Git
run: |
git config user.name "cls-python-workflows[bot]"
git config user.email "269699678+cls-python-workflows[bot]@users.noreply.github.com"
- name: Determine Push Or Not
if: github.event_name == 'push'
run: |
echo "PUSH_TO_BENCHMARKS=true" >> $GITHUB_ENV
- name: Store Benchmark Result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Benchmark cosy-luigi
tool: 'pytest'
output-file-path: cosy-luigi-nested/benchmarks.json
github-token: ${{ steps.cls-python-workflow-token.outputs.token }}
auto-push: ${{ env.PUSH_TO_BENCHMARKS }}
comment-always: ${{ env.COMMENT_ALWAYS }}
summary-always: true
gh-repository: 'github.com/cls-python/cosy-luigi-benchmarks'
benchmark-data-dir-path: '${{ env.BRANCH_NAME }}/benchmarks'