From 8af90a7d783f47c2620596923bdac29be4d456bb Mon Sep 17 00:00:00 2001 From: raskad <32105367+raskad@users.noreply.github.com> Date: Sun, 12 Jun 2022 11:54:26 +0000 Subject: [PATCH] Only run benchmarks on PRs when a label is set (#2114) This changes our ci benchmarks to only run when the label `run-benchmark` is set on the PR. The motivation is to reduce the time waiting on benchmarks to run while working on PRs. Also this saves some ci minutes which is always good. When we spot changes that we suspect impact performance, we can add the `run-benchmark` label to the PR and the benchmarks will run. --- .github/workflows/pull_request.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7d34e842e62..061d1ccda66 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,7 +1,18 @@ -on: [pull_request] name: Benchmarks + +on: + pull_request: + branches: + - main + types: + - opened + - synchronize + - reopened + - labeled + jobs: runBenchmark: + if: contains(github.event.pull_request.labels.*.name, 'run-benchmark') name: run benchmark runs-on: ubuntu-latest steps: