chore: modify test action
[skip ci]
This commit is contained in:
parent
0b5e15d1c5
commit
e2d1d4dc91
1 changed files with 21 additions and 3 deletions
24
.github/actions/acc_test/action.yaml
vendored
24
.github/actions/acc_test/action.yaml
vendored
|
|
@ -204,6 +204,7 @@ runs:
|
|||
fi
|
||||
|
||||
echo "Running acceptance tests for the terraform provider"
|
||||
set +e
|
||||
cd stackit || exit 1
|
||||
TF_ACC=1 \
|
||||
TF_ACC_PROJECT_ID=${TF_ACC_PROJECT_ID} \
|
||||
|
|
@ -214,7 +215,15 @@ runs:
|
|||
TF_ACC_KEK_KEY_RING_ID=${TF_ACC_KEK_KEY_RING_ID} \
|
||||
TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \
|
||||
TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \
|
||||
go test -v ${{ inputs.test_file }} -timeout=${{ inputs.test_timeout_string }}
|
||||
go test -v ${{ inputs.test_file }} -timeout=${{ inputs.test_timeout_string }} | tee -a acc_test_run.log
|
||||
set -e
|
||||
echo "::endgroup::"
|
||||
echo "::group::go test result"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Test failed, see acc_test_run.log for details"
|
||||
cat acc_test_run.log | grep -v "=== RUN" | grep -v "--- PASS" | grep -v "=== CONT" | grep -v "=== PAUSE"
|
||||
exit 1
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
|
|
@ -243,7 +252,7 @@ runs:
|
|||
# testArguments: "./... -timeout ${{ inputs.test_timeout_string }}"
|
||||
# moduleDirectory: "stackit"
|
||||
|
||||
- name: Run acceptance tests
|
||||
- name: Run all acceptance tests
|
||||
if: ${{ inputs.test_file == '' }}
|
||||
shell: bash
|
||||
run: |
|
||||
|
|
@ -258,6 +267,7 @@ runs:
|
|||
|
||||
echo "Running acceptance tests for the terraform provider"
|
||||
cd stackit || exit 1
|
||||
set +e
|
||||
TF_ACC=1 \
|
||||
TF_ACC_PROJECT_ID=${TF_ACC_PROJECT_ID} \
|
||||
TF_ACC_REGION=${TF_ACC_REGION} \
|
||||
|
|
@ -267,7 +277,15 @@ runs:
|
|||
TF_ACC_KEK_KEY_RING_ID=${TF_ACC_KEK_KEY_RING_ID} \
|
||||
TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \
|
||||
TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \
|
||||
go test -v ./... -timeout=${{ inputs.test_timeout_string }}
|
||||
go test -v ./... -timeout=${{ inputs.test_timeout_string }} | tee -a acc_test_run.log
|
||||
set -e
|
||||
echo "::endgroup::"
|
||||
echo "::group::go test result"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Test failed, see acc_test_run.log for details"
|
||||
cat acc_test_run.log | grep -v "=== RUN" | grep -v "--- PASS" | grep -v "=== CONT" | grep -v "=== PAUSE"
|
||||
exit 1
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
env:
|
||||
TF_ACC_PROJECT_ID: ${{ inputs.project_id }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue