-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.1 KB
/
Copy pathexample.yml
File metadata and controls
38 lines (33 loc) · 1.1 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
# Example consumer workflow.
#
# Drop a copy of this into YOUR repository at .github/workflows/profile-diff.yml
# to get a performance-diff comment on every pull request.
name: Profile diff
on:
pull_request:
# The commenter needs write access to pull requests.
permissions:
contents: read
pull-requests: write
jobs:
profile-diff:
runs-on: ubuntu-latest
steps:
- name: Check out the PR
uses: actions/checkout@v4
with:
# Full history so the base commit can be profiled from a worktree.
fetch-depth: 0
# Install whatever your target needs to run (pytest, your package, ...).
- name: Install project dependencies
run: python -m pip install -e ".[test]" || pip install pytest
- name: Profile & diff
uses: python-testing-debugging/profile-diff-action@v1
with:
# Choose ONE target selector:
target: "--pytest tests/"
# target: "--script scripts/benchmark.py"
# target: "--callable mypkg.hotpath:main"
top: "30"
threshold-pct: "5"
fail-on-regression: "false"