Get reliable base ref for push-triggered "Compare Performance" workflow #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The "Compare Performance" GitHub Actions workflow is intended to assist in the evaluation of performance impact of
proposed changes to the tool. It does this by comparing the duration of a run of the engine at the head ref of the
proposal against a base ref.
In the case where the workflow is triggered by a
push
event from a commit, the base ref should be the parent commit.The previous approach of using the
github.event.before
context item was unreliable because this is set to the fake ref0000000000000000000000000000000000000000
when there has not been a previous workflow run on the branch (as is the casewhen branch and commit are pushed from a local to the remote). Example:
https://github.com/arduino/libraries-repository-engine/runs/4538811651?check_suite_focus=true