diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 73a3ed2e42a..f7cf8bfd3db 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -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 uses: CodSpeedHQ/action@f22792bfac16f3e14eb9fbea76f4a48e9cc22b93 # v4.19.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