bug(github_actions): Skip testing single previous commit
Due to the default of executing bash with `-e -o pipefail` this didn't fail gracefully anymore. But an explicit check makes more sense anyways.
This commit is contained in:
parent
edf21742b8
commit
c12715e11f
|
@ -343,6 +343,12 @@ jobs:
|
||||||
git fetch --unshallow --all
|
git fetch --unshallow --all
|
||||||
|
|
||||||
rev_list="$(git rev-list --bisect-all origin/${{ github.base_ref }}..fork/${{ github.head_ref }})"
|
rev_list="$(git rev-list --bisect-all origin/${{ github.base_ref }}..fork/${{ github.head_ref }})"
|
||||||
|
# The most recent commit has already been tested. So if that's the
|
||||||
|
# only commit in the PR, we can stop here.
|
||||||
|
if [[ $(echo "$rev_list" | wc -l) -lt 2 ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
commits="$(echo "$rev_list" | grep -v 'dist=0' | cut -d' ' -f 1)"
|
commits="$(echo "$rev_list" | grep -v 'dist=0' | cut -d' ' -f 1)"
|
||||||
n="$(echo "$commits" | wc -l)"
|
n="$(echo "$commits" | wc -l)"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue