From 296529e48944456b451c51fb1b4c90ab078d73af Mon Sep 17 00:00:00 2001 From: Tony Garcia Date: Wed, 22 Nov 2023 23:32:02 -0600 Subject: [PATCH] Pass total errors Instead of passing the raw output, pass only the total amount of errors found in the sanity test --- .github/workflows/sanity-checks.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/sanity-checks.yml b/.github/workflows/sanity-checks.yml index 8790f546d..11deb725d 100644 --- a/.github/workflows/sanity-checks.yml +++ b/.github/workflows/sanity-checks.yml @@ -30,16 +30,18 @@ jobs: # Always succeeding sanity test until all errors are fixed - name: Run sanity test run: | - { - echo 'sanity<> ${GITHUB_OUTPUT} + --failure-ok \ + 2>&1 \ + ) + echo "${sanity}" + echo errors=$(grep -c "ERROR: [rp]" <<< "${sanity}") >> $GITHUB_OUTPUT working-directory: ${{ matrix.ansible }}/ansible_collections/redhatci/ocp id: sanity_test @@ -47,6 +49,5 @@ jobs: run: | echo "## Error summary" >> ${GITHUB_STEP_SUMMARY} echo "" >> ${GITHUB_STEP_SUMMARY} - echo "Total Errors: $(grep -c "ERROR: [rp]" <<< "${{ steps.sanity_test.outputs.sanity }}") >> ${GITHUB_STEP_SUMMARY} - grep "ERROR: F" <<< "${{ steps.sanity_test.outputs.sanity }}" >> ${GITHUB_STEP_SUMMARY} + echo "Total Errors: ${{ steps.sanity_test.outputs.errors }}" >> ${GITHUB_STEP_SUMMARY} echo "" >> ${GITHUB_STEP_SUMMARY}