fix: tf acc test pipeline
Some checks failed
CI Workflow / Prepare GO cache (pull_request) Has been cancelled
CI Workflow / Check GoReleaser config (pull_request) Has been cancelled
CI Workflow / Test readiness for publishing provider (pull_request) Has been cancelled
CI Workflow / CI run tests (pull_request) Has been cancelled
CI Workflow / CI run build and linting (pull_request) Has been cancelled
CI Workflow / Code coverage report (pull_request) Has been cancelled
Some checks failed
CI Workflow / Prepare GO cache (pull_request) Has been cancelled
CI Workflow / Check GoReleaser config (pull_request) Has been cancelled
CI Workflow / Test readiness for publishing provider (pull_request) Has been cancelled
CI Workflow / CI run tests (pull_request) Has been cancelled
CI Workflow / CI run build and linting (pull_request) Has been cancelled
CI Workflow / Code coverage report (pull_request) Has been cancelled
This commit is contained in:
parent
f783c566fb
commit
20f08d6ff4
1 changed files with 31 additions and 4 deletions
35
.github/actions/acc_test/action.yaml
vendored
35
.github/actions/acc_test/action.yaml
vendored
|
|
@ -83,14 +83,31 @@ runs:
|
|||
check-latest: true
|
||||
go-version-file: 'go.mod'
|
||||
|
||||
- name: Determine GOMODCACHE
|
||||
shell: bash
|
||||
id: goenv
|
||||
run: |
|
||||
set -e
|
||||
echo "gomodcache=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Restore cached GO pkg
|
||||
id: cache-gopkg
|
||||
uses: actions/cache/restore@v5
|
||||
with:
|
||||
path: "${{ steps.goenv.outputs.gomodcache }}"
|
||||
key: ${{ runner.os }}-gopkg
|
||||
|
||||
- name: Install go tools
|
||||
if: steps.cache-gopkg.outputs.cache-hit != 'true'
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
go mod download
|
||||
go install golang.org/x/tools/cmd/goimports@latest
|
||||
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.7.2
|
||||
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@v0.24.0
|
||||
go install github.com/hashicorp/terraform-plugin-codegen-framework/cmd/tfplugingen-framework@latest
|
||||
go install github.com/hashicorp/terraform-plugin-codegen-openapi/cmd/tfplugingen-openapi@latest
|
||||
go install github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@latest
|
||||
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
|
||||
|
||||
# - name: Prepare pkg_gen directory
|
||||
# shell: bash
|
||||
|
|
@ -101,15 +118,25 @@ runs:
|
|||
shell: bash
|
||||
run: go mod tidy
|
||||
|
||||
- name: Save GO package Cache
|
||||
id: cache-gopkg-save
|
||||
uses: actions/cache/save@v5
|
||||
with:
|
||||
path: |
|
||||
${{ steps.goenv.outputs.gomodcache }}
|
||||
key: ${{ runner.os }}-gopkg
|
||||
|
||||
- name: Ensure service account file exists
|
||||
shell: bash
|
||||
run: |
|
||||
set -e
|
||||
if [[ ! -f "${{ inputs.service_account_json_file_path }}" ]]; then
|
||||
if [[ -z "${{ inputs.service_account_json_file_content }}" ]]; then
|
||||
echo "unable to find service account file '${{ inputs.service_account_json_file_path }}' \n and service_account_json_file_content is empty"
|
||||
echo "unable to find service account file '${{ inputs.service_account_json_file_path }}'"
|
||||
if [ -z "${{ inputs.service_account_json_file_content }}" ]; then
|
||||
echo "ERROR: service_account_json_file_content MUST NOT be empty if account file is missing"
|
||||
exit 1
|
||||
fi
|
||||
echo "creating service account file '${{ inputs.service_account_json_file_path }}'"
|
||||
echo "${{ inputs.service_account_json_file_content }}" > "${{ inputs.service_account_json_file_path }}"
|
||||
fi
|
||||
cat "${{ inputs.service_account_json_file_path }}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue