ImperialCollegeLondon / pyrealm

Development of the pyrealm package, providing an integrated toolbox for modelling plant productivity, growth and demography using Python.
https://pyrealm.readthedocs.io/
MIT License
16 stars 6 forks source link

Profiling workflow still broken #224

Closed davidorme closed 2 months ago

davidorme commented 2 months ago

The profiling GH action is still broken - the benchmarking tests passed but the problem is that I forgot that the develop and main branch are protected and won’t accept a push of the updates to the benchmarking data and plots. The updates have to come in via a PR.

https://github.com/ImperialCollegeLondon/pyrealm/actions/runs/8813621787/job/24192028740

There isn't a great solution here to the broader question of how and when to add this data. @tztsai has pointed out this thread:

https://stackoverflow.com/questions/62846375/perform-github-action-when-trying-to-merge-branch

That summarizes to:

  1. Do the profiling on the target branch (as now) - we then have to PR the changed files.
  2. Use the merge_queue option as a way to catch run the profiling on a merge_queue events, derailing the PR on failed profiling, which feels kinda hacky.
  3. Do the profiling on all PRs, so add the updates to the incoming changes, but reduce the number of times it triggers by targeting something like approval events or review requests (see here for run on approval)