From a5d3ba419ce08ff9b734b1a62674e64b4fb1b9e8 Mon Sep 17 00:00:00 2001 From: Elijah Ahianyo Date: Mon, 8 Apr 2024 11:22:25 -0700 Subject: [PATCH] Run benchmarks when PR gets merged (#3022) --- .github/workflows/benchmarks.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 4d8c5fedc..a06788607 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,8 +1,9 @@ name: benchmarking on: - push: - branches: [main] + pull_request: + types: + - closed paths-ignore: - '**/*.md' @@ -22,6 +23,7 @@ env: jobs: reflex-web: + if: github.event.pull_request.merged == true strategy: fail-fast: false matrix: @@ -71,6 +73,7 @@ jobs: GITHUB_SHA: ${{ github.sha }} simple-apps-benchmarks: + if: github.event.pull_request.merged == true env: OUTPUT_FILE: benchmarks.json timeout-minutes: 50 @@ -132,6 +135,7 @@ jobs: --event-type "${{ github.event_name }}" --actor "${{ github.actor }}" --pr-id "${{ github.event.pull_request.id }}" reflex-build-size: + if: github.event.pull_request.merged == true timeout-minutes: 30 strategy: # Prioritize getting more information out of the workflow (even if something fails) @@ -159,6 +163,7 @@ jobs: --measurement-type "reflex-build" --path ./dist reflex-plus-dependency-size: + if: github.event.pull_request.merged == true timeout-minutes: 30 strategy: # Prioritize getting more information out of the workflow (even if something fails)