fix: try fix empty outputs
[skip ci]
This commit is contained in:
parent
d16b97a8e9
commit
2bdb5d4eb2
2 changed files with 15 additions and 10 deletions
11
.github/actions/acc_test/action.yaml
vendored
11
.github/actions/acc_test/action.yaml
vendored
|
|
@ -207,7 +207,7 @@ runs:
|
|||
id: testrun
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::group::go test file"
|
||||
echo "::group::go test"
|
||||
set -e
|
||||
set -o pipefail
|
||||
|
||||
|
|
@ -233,18 +233,19 @@ runs:
|
|||
TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \
|
||||
TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \
|
||||
go test -v ${testfile} -timeout=${{ inputs.test_timeout_string }} | tee -a acc_test_run.log
|
||||
echo "::endgroup::"
|
||||
set -e
|
||||
echo "::group::go test result"
|
||||
|
||||
if [[ $(cat acc_test_run.log | grep "FAIL") ]]; then
|
||||
echo "::endgroup::"
|
||||
echo "::group::go test result"
|
||||
echo "Test failed, see acc_test_run.log for details"
|
||||
res=$(cat acc_test_run.log | grep -v "=== RUN" | grep -v "\-\-\- PASS" | grep -v "=== CONT" | grep -v "=== PAUSE")
|
||||
echo "result=FAIL: ${res}" >> "$GITHUB_OUTPUT"
|
||||
echo "::endgroup::"
|
||||
exit 1
|
||||
else
|
||||
echo "result=no FAIL detected" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
echo "result=no FAIL detected" >> "$GITHUB_OUTPUT"
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue