Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,16 @@ jobs:
GHA_LIBWEBP_CACHE_HIT: ${{ steps.cache-libwebp.outputs.cache-hit }}

- name: Run CodSpeed benchmarks
if: github.event_name != 'pull_request' || github.event.repository.fork == false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe simply

Suggested change
if: github.event_name != 'pull_request' || github.event.repository.fork == false
if: github.event.repository.fork == false

in conjunction with the below (see rationale there).

WDYT?

uses: CodSpeedHQ/action@373d6868929f444bc08d901fd0eb0ad52a8875ea # v5.2.1
with:
mode: simulation
run: |
python3 -m pip install -e . pytest-codspeed
pytest -vv --codspeed Tests/benchmarks.py
python3 -m pytest -vv --codspeed Tests/benchmarks.py

- name: Run CodSpeed benchmarks on pull requests to a fork
if: github.event_name == 'pull_request' && github.event.repository.fork == true
run: |
python3 -m pip install -e . pytest-codspeed
python3 -m pytest -vv --codspeed Tests/benchmarks.py
Comment on lines +99 to +103

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this alternate is really needed. If you're not using the codspeed action (that does CPU simulation and other deep magic), you're not going to get comparable numbers anyhow.

Suggested change
- name: Run CodSpeed benchmarks on pull requests to a fork
if: github.event_name == 'pull_request' && github.event.repository.fork == true
run: |
python3 -m pip install -e . pytest-codspeed
python3 -m pytest -vv --codspeed Tests/benchmarks.py