test: add acceptance harness, pcd_identity_auth_scope acc test, and CI #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-test: | |
| name: build / vet / fmt / unit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: build | |
| run: go build ./... | |
| - name: vet | |
| run: go vet ./... | |
| - name: gofmt | |
| run: | | |
| out="$(gofmt -l .)" | |
| if [ -n "$out" ]; then echo "gofmt needed on:"; echo "$out"; exit 1; fi | |
| - name: unit tests | |
| # Acceptance (TF_ACC) and live (PCD_LIVE_TEST) tests self-skip here. | |
| run: go test ./internal/... -timeout 120s | |
| terraform-fmt: | |
| name: terraform fmt (examples) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_wrapper: false | |
| - run: terraform fmt -check -recursive ./examples |