From c12715e11f3a66ef9df43fff40e2231a9fa60003 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sun, 19 Sep 2021 14:51:49 +0200 Subject: [PATCH 1/2] 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. --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a3b46962..1194f74d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -343,6 +343,12 @@ jobs: git fetch --unshallow --all 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)" n="$(echo "$commits" | wc -l)" From 4b6d7fd2417ce6ee33c7a084a551581a49fae0d9 Mon Sep 17 00:00:00 2001 From: Lucas Schwiderski Date: Sun, 19 Sep 2021 15:10:46 +0200 Subject: [PATCH 2/2] bug(github_actions): Fix logging failed commits Signed-off-by: Lucas Schwiderski --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1194f74d..7fd86c3e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -380,7 +380,7 @@ jobs: fi done - git checkout --quiet --force ${{ github.head_ref }} + git checkout --quiet --force fork/${{ github.head_ref }} if [ -n "$failed" ]; then echo "Checks failed for these commits:"