diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index df3e10e..d3ae7ac 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -42,19 +42,25 @@ jobs: enable-cache: true - name: Benchmark head - run: > - uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS - --benchmark-json "$RUNNER_TEMP/head.json" + run: | + uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ + --benchmark-json "$RUNNER_TEMP/head.json" + uv run --no-sync python -c "import tsam; print('head tsam:', tsam.__version__)" - name: Benchmark base (${{ github.event.pull_request.base.ref }}) if: github.event_name == 'pull_request' # Base src with the head's benchmark suite overlaid, so test IDs match # and suite edits in the PR still compare against the same cases. + # Drop the head run's uv.lock (untracked — the repo commits none): + # uv keeps a satisfying lock as-is, so without this a head that + # changes dependencies leaks its resolution into the base run. run: | git checkout --detach ${{ github.event.pull_request.base.sha }} git checkout ${{ github.sha }} -- benchmarks/ - uv run --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ + rm -f uv.lock + uv run --exact --with "$BENCHMEM" pytest benchmarks/ $BENCH_ARGS \ --benchmark-json "$RUNNER_TEMP/base.json" + uv run --no-sync python -c "import tsam; print('base tsam:', tsam.__version__)" - name: Render report and plot run: |