From bb6e64052487511a23e256db10ca74308dd5c11b Mon Sep 17 00:00:00 2001 From: Alastair Weakley Date: Mon, 27 May 2024 15:39:25 +1000 Subject: [PATCH] Store/retrieve previous results --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 370258a..fefb0c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,12 @@ jobs: run: | pytest -m benchmark --benchmark-json=./output.json + - name: Download previous benchmark data + uses: actions/cache@v4 + with: + path: ./cache + key: ${{ runner.os }}-benchmark + - name: Publish benchmark results uses: benchmark-action/github-action-benchmark@v1 if: github.event_name != 'pull_request' @@ -101,11 +107,13 @@ jobs: comment-always: true output-file-path: output.json github-token: ${{ secrets.GITHUB_TOKEN }} - comment-on-alert: false + comment-on-alert: true save-data-file: true summary-always: true + # Where the previous data file is stored + external-data-json-path: ./cache/benchmark-data.json - - name: Publish benchmark results + - name: Comment on benchmark results without publishing uses: benchmark-action/github-action-benchmark@v1 if: github.event_name == 'pull_request' with: @@ -116,3 +124,4 @@ jobs: comment-on-alert: false save-data-file: true summary-always: true + external-data-json-path: ./cache/benchmark-data.json