Skip to content

Bump goreleaser/goreleaser-action from 4 to 5 #58

Bump goreleaser/goreleaser-action from 4 to 5

Bump goreleaser/goreleaser-action from 4 to 5 #58

Workflow file for this run

name: Run test suite
on:
workflow_dispatch:
pull_request:
paths-ignore:
- "README.md"
types:
- opened
- synchronize
- reopened
permissions:
contents: read
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: true
go-version-file: "go.mod"
- run: go mod download
- run: go build -v .
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: true
go-version-file: "go.mod"
- run: go mod download
- name: Run linters
uses: golangci/golangci-lint-action@v3
with:
version: latest
generate:
name: Generate artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
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)
# Run acceptance tests in a matrix with Terraform CLI versions
test:
name: Terraform Provider Unit Tests
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
# list whatever Terraform versions here you would like to support
terraform:
- "1.0.*"
- "1.1.*"
- "1.2.*"
- "1.3.*"
- "1.4.*"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: "go.mod"
cache: true
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- run: go mod download
- run: make test-ci
timeout-minutes: 10
# env:
# TF_ACC: "1"