From dedfa7af7250762f473a81928a609b04198d11b1 Mon Sep 17 00:00:00 2001 From: Wei Ji <23487320+weiji14@users.noreply.github.com> Date: Mon, 25 Dec 2023 18:55:20 +1300 Subject: [PATCH] Only run when non-test PyGMT source files and benchmarks.yml is modified Trigger the benchmark run when files in `pygmt/clib`, `pygmt/datasets`, `pygmt/helpers`, `pygmt/src` and `pygmt/*.py` are modified (i.e. except `pygmt/tests/**`), and also when .github/workflows/benchmarks.yml is modified. --- .github/workflows/benchmarks.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index c9b93da6c54..2b562e9aa46 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -9,8 +9,15 @@ on: # Run on pushes to the main branch push: branches: [ main ] - # Uncomment the 'pull_request' line below to trigger the workflow in PR + paths: + - 'pygmt/**/*.py' + - '!pygmt/tests/**' + - '.github/workflows/benchmarks.yml' pull_request: + paths: + - 'pygmt/**/*.py' + - '!pygmt/tests/**' + - '.github/workflows/benchmarks.yml' # `workflow_dispatch` allows CodSpeed to trigger backtest # performance analysis in order to generate initial data. workflow_dispatch: