Pierluc codes/speed up tests #31
This file contains 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: Run Identity Tests on Identity Code Changes | |
on: | |
pull_request: | |
paths: | |
- 'internal/provider/iam/**' | |
- 'internal/clients/group.go' | |
- 'internal/clients/iam.go' | |
jobs: | |
identity_tests: | |
name: Run identity specific tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Go | |
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | |
with: | |
cache: true | |
go-version-file: 'go.mod' | |
cache-dependency-path: go.sum | |
id: go | |
- name: Run 'go mod tidy' and check for differences | |
run: | | |
make depscheck | |
- name: Get dependencies | |
run: | | |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3 | |
go mod download | |
- name: Build | |
run: | | |
go build -v . | |
- name: Run identity tests | |
env: | |
HCP_API_HOST: ${{ secrets.HCP_API_HOST }} | |
HCP_AUTH_URL: ${{ secrets.HCP_AUTH_URL }} | |
HCP_CLIENT_ID: ${{ secrets.HCP_CLIENT_ID }} | |
HCP_CLIENT_SECRET: ${{ secrets.HCP_CLIENT_SECRET }} | |
HCP_ORGANIZATION_ID: ${{ secrets.HCP_ORGANIZATION_ID }} | |
HCP_PROJECT_ID: ${{ secrets.HCP_PROJECT_ID }} | |
run: | | |
make testacc-ci TEST=./internal/provider/iam |