From 89d20cdbaa60fd55ae24e1ed82aa9928b7a1f095 Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Wed, 2 Oct 2024 13:16:32 -0700 Subject: [PATCH] Ensure that the tests were executed --- .github/workflows/chef-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/chef-test.yml b/.github/workflows/chef-test.yml index 23479ef826..a4a67ead55 100644 --- a/.github/workflows/chef-test.yml +++ b/.github/workflows/chef-test.yml @@ -124,6 +124,9 @@ jobs: - name: kitchen test ${{ matrix.SUITE }}-${{ matrix.DISTRO }} run: | kitchen test ${{ matrix.SUITE }}-${{ matrix.DISTRO }} + # For some reason, kitchen returns 0 here even if there are test failures, so check the log instead. + grep -q "No tests executed." ./kitchen.log && exit 1 + grep -q "0 failures" ./kitchen.log || exit 1 shell: bash env: KITCHEN_YAML: kitchen.windows.yml