Skip to content

Do client-side blocking for group operations with an operation id in response #15

Do client-side blocking for group operations with an operation id in response

Do client-side blocking for group operations with an operation id in response #15

Workflow file for this run

name: TestAcc Iam
on:
workflow_call:
workflow_dispatch:
pull_request:
paths:
- 'internal/clients/group.go'
- 'internal/clients/iam.go'
- 'internal/clients/iampolicy/**'
- 'internal/provider/iam/**'
- 'internal/provider/resourcemanager/**'
# This prevents more than one run of this workflow from executing at a time.
# Up to 1 additional run will be queued, with anything futher being cancelled from the queue.
concurrency:
group: testacc-iam
cancel-in-progress: false
permissions:
contents: write
jobs:
acceptance_tests:
name: IAM Acceptance Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
token: ${{ secrets.HCP_SDK_PIPELINE_TOKEN }}
- name: Set up Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
cache: true
go-version-file: 'go.mod'
cache-dependency-path: go.sum
id: go
- name: Install Dependencies
env:
GOPRIVATE: 'github.com/hashicorp/*'
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.5
go mod tidy
- name: Run 'go mod tidy'
run: |
make depscheck
- name: Get dependencies
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.64.5
go mod download
- name: Go Build
run: |
go build -v .
- name: Run TestAcc
env:
TF_ACC: 1
HCP_API_HOST: ${{ secrets.HCP_API_HOST_INT }}
HCP_AUTH_URL: ${{ secrets.HCP_AUTH_URL_INT }}
HCP_ORGANIZATION_ID: ${{ secrets.IAM_HCP_ORGANIZATION_ID }}
HCP_PROJECT_ID: ${{ secrets.IAM_HCP_PROJECT_ID }}
HCP_CLIENT_ID: ${{ secrets.IAM_HCP_CLIENT_ID }}
HCP_CLIENT_SECRET: ${{ secrets.IAM_HCP_CLIENT_SECRET }}
run: |
go test \
./internal/provider/iam \
./internal/provider/resourcemanager \
-v \
-short \
-test.v \
-parallel=10 \
-timeout=360m \
-coverprofile=testacc-iam.out
go tool cover \
-html=testacc-iam.out \
-o testacc-iam.html
- name: Upload TestAcc Coverage Artifact
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: coverage-iam
path: testacc-iam.html