Skip to content

Bump hashicorp/setup-terraform from 2.0.3 to 3.0.0 #284

Bump hashicorp/setup-terraform from 2.0.3 to 3.0.0

Bump hashicorp/setup-terraform from 2.0.3 to 3.0.0 #284

Workflow file for this run

name: Tests
on:
pull_request_target:
branches:
- 'main'
push:
branches:
- 'main'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
if: "contains(github.event_name, 'pull_request')"
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: checkout from push event
if: github.event_name == 'push'
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20'
check-latest: 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)
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
terraform:
- '1.3.*'
- '1.2.*'
- '1.1.*'
- '1.0.*'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
if: "contains(github.event_name, 'pull_request')"
with:
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: checkout from push event
if: github.event_name == 'push'
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version: '1.20'
check-latest: true
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go mod download
- run: go build -v .
- run: TF_ACC=1 go test -v -cover ./internal/provider/