Adding test for Namespace Already Exists #58
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 Tests | |
on: | |
pull_request: | |
paths: | |
- '.github/workflows/test.yaml' | |
- '**.go' | |
permissions: | |
# Permission for checking out code | |
contents: read | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- run: go mod download | |
- run: go build -v . | |
- name: Run linters | |
uses: golangci/[email protected] | |
with: | |
version: latest | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
go-version-file: 'go.mod' | |
cache: true | |
- run: go generate ./... | |
- name: git diff | |
run: | | |
git diff --compact-summary --exit-code || \ | |
(echo; echo "Unexpected difference in directories after code generation. Run 'go generate ./...' command and commit."; exit 1) | |
acceptance: | |
name: Acceptance Tests (Terraform ${{ matrix.terraform-version }}) | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
terraform-version: | |
- '1.0.*' | |
- '1.1.*' | |
- '1.2.*' | |
- '1.3.*' | |
- '1.4.*' | |
- '1.5.*' | |
- '1.6.*' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: temporalio/setup-temporal@v0 | |
- run: temporal server start-dev --headless & | |
shell: bash | |
- uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'go.mod' | |
- uses: hashicorp/[email protected] | |
with: | |
terraform_version: ${{ matrix.terraform-version }} | |
terraform_wrapper: false | |
- run: go test -v -cover ./... | |
env: | |
TF_ACC: '1' | |
unit: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
go-version-file: 'go.mod' | |
- run: go test -v -cover ./... | |