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:
Lucas Schwiderski 2021-09-19 14:51:49 +02:00
parent edf21742b8
commit c12715e11f
No known key found for this signature in database
GPG Key ID: AA12679AAA6DF4D8
1 changed files with 6 additions and 0 deletions

View File

@ -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)"