lorenzwalthert / touchstone

Smart benchmarking of pull requests with statistical confidence
https://lorenzwalthert.github.io/touchstone
Other
53 stars 7 forks source link

Skip when no changes to source code files? #117

Open IndrajeetPatil opened 1 year ago

IndrajeetPatil commented 1 year ago

Given how expensive this workflow is, do you think {touchstone} should skip benchmarking when there is no change to any files containing source code?

E.g., here only a YAML file was changed, but we are still benchmarking ever commit in this PR, which is unnecessary since this file doesn't contain any source code and any change to it will have no effect on performance.

lorenzwalthert commented 1 year ago

Maybe source files are too restrictive. But we could restrict it to source files + DESCRIPTION + touchstone/*? I.e. if dependencies change, we don't want to skip.

IndrajeetPatil commented 1 year ago

Yes, that sounds good to me!

Thanks for being open to the idea.

assignUser commented 1 year ago

You can easily implement this change directly in your workflow file by adding the paths node:

on: 
  pull_request:
    paths:
      # Filter by dir
     - "r/**"
     - "src/**"
     - "touchstone/**"
     # or file type
     - "*.r"
     # or specific files
     - ".github/workflows/touchstone-*.yaml"
     - DESCRIPTION

I think running without filter should be the default but we should probably add some documentation about this functionality :+1:

lorenzwalthert commented 1 year ago

Looks good. Should we add this to the template?