diff --git a/.github/actions/acc_test/action.yaml b/.github/actions/acc_test/action.yaml index 208c9640..ccd08969 100644 --- a/.github/actions/acc_test/action.yaml +++ b/.github/actions/acc_test/action.yaml @@ -145,6 +145,7 @@ runs: if: inputs.service_account_json_content != '' shell: bash run: | + echo "::group::create service account file" set -e set -o pipefail @@ -160,11 +161,13 @@ runs: echo "${{ inputs.service_account_json_content }}" > stackit/"${{ inputs.service_account_json_file_path }}" fi ls -l stackit/"${{ inputs.service_account_json_file_path }}" + echo "::endgroup::" - name: Creating service_account file from base64 json input if: inputs.service_account_json_content_b64 != '' shell: bash run: | + echo "::group::create service account file" set -e set -o pipefail @@ -180,11 +183,13 @@ runs: echo "${{ inputs.service_account_json_content_b64 }}" | base64 -d > stackit/"${{ inputs.service_account_json_file_path }}" fi ls -l stackit/"${{ inputs.service_account_json_file_path }}" + echo "::endgroup::" - name: Run acceptance test file if: ${{ inputs.test_file != '' }} shell: bash run: | + echo "::group::go test file" set -e set -o pipefail @@ -200,6 +205,7 @@ runs: TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \ TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \ go test ${{ inputs.test_file }} -count=1 -timeout=${{ inputs.test_timeout_string }} + echo "::endgroup::" env: TF_ACC_PROJECT_ID: ${{ inputs.project_id }} TF_ACC_REGION: ${{ inputs.region }} @@ -209,26 +215,27 @@ runs: TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }} TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }} - - name: Run test action - if: ${{ inputs.test_file == '' }} - env: - TF_ACC: 1 - TF_ACC_PROJECT_ID: ${{ inputs.project_id }} - TF_ACC_REGION: ${{ inputs.region }} - TF_ACC_TEST_PROJECT_USER_EMAIL: ${{ inputs.project_user_email }} - TF_ACC_KEK_KEY_ID: ${{ inputs.tf_acc_kek_key_id }} - TF_ACC_KEK_KEY_RING_ID: ${{ inputs.tf_acc_kek_key_ring_id }} - TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }} - TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }} - TF_ACC_SERVICE_ACCOUNT_FILE: "${PWD}/${{ inputs.service_account_json_file_path }}" - uses: robherley/go-test-action@v0.1.0 - with: - testArguments: "./... -timeout 45m" +# - name: Run test action +# if: ${{ inputs.test_file == '' }} +# env: +# TF_ACC: 1 +# TF_ACC_PROJECT_ID: ${{ inputs.project_id }} +# TF_ACC_REGION: ${{ inputs.region }} +# TF_ACC_TEST_PROJECT_USER_EMAIL: ${{ inputs.project_user_email }} +# TF_ACC_KEK_KEY_ID: ${{ inputs.tf_acc_kek_key_id }} +# TF_ACC_KEK_KEY_RING_ID: ${{ inputs.tf_acc_kek_key_ring_id }} +# TF_ACC_KEK_KEY_VERSION: ${{ inputs.tf_acc_kek_key_version }} +# TF_ACC_KEK_SERVICE_ACCOUNT: ${{ inputs.tf_acc_kek_service_account }} +# TF_ACC_SERVICE_ACCOUNT_FILE: "${PWD}/${{ inputs.service_account_json_file_path }}" +# uses: robherley/go-test-action@v0.1.0 +# with: +# testArguments: "./... -timeout 45m" - name: Run acceptance tests if: ${{ inputs.test_file == '' }} shell: bash run: | + echo "::group::go test all" set -e set -o pipefail @@ -244,6 +251,7 @@ runs: TF_ACC_KEK_KEY_VERSION=${TF_ACC_KEK_KEY_VERSION} \ TF_ACC_KEK_SERVICE_ACCOUNT=${TF_ACC_KEK_SERVICE_ACCOUNT} \ go test ./... -count=1 -timeout=${{ inputs.test_timeout_string }} + echo "::endgroup::" env: TF_ACC_PROJECT_ID: ${{ inputs.project_id }} TF_ACC_REGION: ${{ inputs.region }}