VAULT-29412: Preview of new Vault Radar resource. #3458
Workflow file for this run
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: Terraform Provider Checks | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'README.md' | |
jobs: | |
# ensure go.mod and go.sum are updated | |
depscheck: | |
name: Check Dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
cache: true | |
go-version-file: 'go.mod' | |
id: go | |
- name: Run 'go mod tidy' and check for differences | |
run: | | |
make depscheck | |
# ensure the code builds | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
cache: true | |
go-version-file: 'go.mod' | |
id: go | |
- name: Get dependencies | |
run: | | |
go mod download | |
- name: Build | |
run: | | |
go build -v . | |
# run unit tests and linter | |
test_and_lint: | |
name: Unit Test and Lint | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
cache: true | |
go-version-file: 'go.mod' | |
id: go | |
- name: Get dependencies | |
run: | | |
go install github.com/golangci/golangci-lint/cmd/[email protected] | |
go mod download | |
- name: Run unit tests and linter | |
run: | | |
make test-ci | |
- name: Upload Coverage Artifacts | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: Test Coverage | |
path: coverage.html | |
# ensure docs are generated | |
gencheck: | |
name: Check Generated Docs | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set up Go | |
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 | |
with: | |
cache: true | |
go-version-file: 'go.mod' | |
id: go | |
- name: Generate docs and check for differences | |
run: | | |
make gencheck |