ci: add re-test functionality to staging workflow #134
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.
Description
Add re-test functionality to staging workflow - using re-test github action
Checklist
Additional information
In case head branch ( feature/topic/hotfix - whichever ) forked from the base branch, and before merging it back, base branch commits tree advanced with additional commits ( merged from different branches or pushed directly - whichever ), in such case, if the head branch is not rebased on top of the base branch, there is a chance ( not big chance but still) that tests that were passed on PR workflow will fail after head branch will be merged to base, in this case, i want to identify such situations during the staging workflow, but still, i don't want to run all the time tests before publishing the npm package, but i want to identify if a re-test is needed, so probably most of the times re-test will not be required , and then there is no point to run the UT + IT Tests in staging , but in few times that re-test is needed in staging( before publishing the package), we'll run the tests. That way i'll guarantee that no broken packages will be staged.
I've noticed that checkout action of PR workflow, by default ( being used there - the action checkout, checking out the base branch - main, and merged the Head into it), but still in such case, if the PR workflow executed successfully , both tests suites passed flawlessly , still the PR need to be reviewed, approved and merged before the staging workflow will run, these lifecycle actions of PR might take couple of days, during this time, base branch can advance with new commits containing new logic.
In order to identify all of these use cases, we'll use a dedicated action that capable of identifying precisely whenever re-test is needed.