Skip to content

chore(deps): update golangci/golangci-lint-action action to v4 #169

chore(deps): update golangci/golangci-lint-action action to v4

chore(deps): update golangci/golangci-lint-action action to v4 #169

Workflow file for this run

name: Check
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
id: go
- name: Install terraform
run: wget https://releases.hashicorp.com/terraform/1.2.2/terraform_1.2.2_linux_amd64.zip -O /tmp/terraform.zip && sudo unzip -o -d /usr/local/bin/ /tmp/terraform.zip
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v4.0.1
with:
version: v1.50
- name: Get dependencies
run: go get -v -t -d ./...
- name: Test
run: go test -v -cover -coverprofile=coverage.txt ./...
- name: Coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.txt
- name: Build a snapshot with GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
args: build --snapshot
pre012:
name: pre012
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
id: go
- name: Install terraform
run: wget https://releases.hashicorp.com/terraform/0.11.15/terraform_0.11.15_linux_amd64.zip -O /tmp/terraform.zip && sudo unzip -o -d /usr/local/bin/ /tmp/terraform.zip
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: go get -v -t -d ./...
- name: Test
run: go test -v -cover -coverprofile=coverage.txt ./...
- name: Coverage
uses: codecov/codecov-action@v3
with:
files: ./coverage.txt
terraform_version_compatibility:
name: Terraform compatibility
runs-on: ubuntu-latest
strategy:
matrix:
terraform:
- 0.10.1
- 0.10.2
- 0.10.3
- 0.10.4
- 0.10.5
- 0.10.6
- 0.10.7
- 0.10.8
- 0.11.0
- 0.11.1
- 0.11.2
- 0.11.3
- 0.11.4
- 0.11.5
- 0.11.6
- 0.11.7
- 0.11.8
- 0.11.9
- 0.11.10
- 0.11.11
- 0.11.12
- 0.11.13
- 0.11.14
- 0.11.15
- 0.12.0
- 0.12.1
- 0.12.2
- 0.12.3
- 0.12.4
- 0.12.5
- 0.12.6
- 0.12.7
- 0.12.8
- 0.12.9
- 0.12.10
- 0.12.11
- 0.12.12
- 0.12.13
- 0.12.14
- 0.12.15
- 0.12.16
- 0.12.17
- 0.12.18
- 0.12.19
- 0.12.10
- 0.12.21
- 0.12.22
- 0.12.23
- 0.12.24
- 0.12.25
- 0.12.26
- 0.12.27
- 0.12.28
- 0.12.29
- 0.12.30
- 0.12.31
- 0.13.0
- 0.13.1
- 0.13.2
- 0.13.3
- 0.13.4
- 0.13.5
- 0.13.6
- 0.13.7
- 0.14.0
- 0.14.1
- 0.14.2
- 0.14.3
- 0.14.4
- 0.14.5
- 0.14.6
- 0.14.7
- 0.14.8
- 0.14.9
- 0.14.10
- 0.14.11
- 0.15.0
- 0.15.1
- 0.15.2
- 0.15.3
- 0.15.4
- 0.15.5
- 1.0.0
- 1.0.1
- 1.0.2
- 1.0.3
- 1.0.4
- 1.0.5
- 1.0.6
- 1.0.7
- 1.0.8
- 1.0.9
- 1.0.10
- 1.0.11
- 1.1.0
- 1.1.1
- 1.1.2
- 1.1.3
- 1.1.4
- 1.1.5
- 1.1.6
- 1.1.7
- 1.1.8
- 1.1.9
- 1.2.0
- 1.2.1
- 1.2.2
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
id: go
- name: Install terraform
run: wget https://releases.hashicorp.com/terraform/${{ matrix.terraform }}/terraform_${{ matrix.terraform }}_linux_amd64.zip -O /tmp/terraform.zip && sudo unzip -o -d /usr/local/bin/ /tmp/terraform.zip
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: go get -v -t -d ./...
# Making a special case for old versions of terraform, to ignore a revoked
# GPG key from Hashicorp that is trusted by old versions of terraform.
# https://discuss.hashicorp.com/t/terraform-updates-for-hcsec-2021-12/23570
- name: Test
run: |
case ${{ matrix.terraform }} in
# For the old versions of terraform that are patched, run the tests as normal.
0.11.15 | 0.12.31 | 0.13.7 )
go test -v ./...
;;
# For the old unpatched versions, skip verifying plugins in the init step.
0.10.* | 0.11.* | 0.12.* | 0.13.* )
TF_CLI_ARGS_init="-verify-plugins=false" go test -v ./...
;;
# For all other versions, run the tests as normal.
* )
go test -v ./...
;;
esac
- name: Build
run: go build -v .