Bump github.com/golangci/golangci-lint from 1.43.0 to 1.54.2 in /tools #64
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: Acceptance Test Linting | |
on: | |
push: | |
branches: | |
- main | |
- "release/**" | |
pull_request: | |
paths: | |
- .github/workflows/acctest-terraform-lint.yml | |
- .go-version | |
- .tflint.hcl | |
- 'internal/service/**/*_test.go' | |
- scripts/validate-terraform.sh | |
- tools/go.mod | |
jobs: | |
terrafmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# See also: https://github.com/actions/setup-go/pull/62 | |
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: actions/cache@v2 | |
continue-on-error: true | |
timeout-minutes: 2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
- run: cd tools && go install github.com/katbyte/terrafmt | |
- run: | | |
# efs/file_system_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
# kms/grant_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
# quicksight/user_test.go: format verb as resource name (%[1]q). https://github.com/katbyte/terrafmt/issues/48 | |
# sns/platform_application_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
find ./internal/service -type f -name '*_test.go' \ | |
| sort -u \ | |
| grep -v efs/file_system_test.go \ | |
| grep -v kms/grant_test.go \ | |
| grep -v quicksight/user_test.go \ | |
| grep -v sns/platform_application_test.go \ | |
| xargs -I {} terrafmt diff --check --fmtcompat {} | |
validate-terraform: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
# See also: https://github.com/actions/setup-go/pull/62 | |
- run: echo "GO_VERSION=$(cat .go-version)" >> $GITHUB_ENV | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ env.GO_VERSION }} | |
- uses: actions/cache@v2 | |
continue-on-error: true | |
timeout-minutes: 2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-pkg-mod-${{ hashFiles('go.sum') }} | |
- run: cd tools && go install github.com/katbyte/terrafmt | |
- run: cd tools && go install github.com/terraform-linters/tflint | |
- uses: actions/cache@v2 | |
name: Cache plugin dir | |
with: | |
path: ~/.tflint.d/plugins | |
key: ${{ matrix.os }}-tflint-${{ hashFiles('.tflint.hcl') }} | |
- run: tflint --init | |
- run: | | |
# efs/file_system_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
# kms/grant_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
# lambda/permission_test.go: format verb as resource name ("%s"). https://github.com/katbyte/terrafmt/issues/48 | |
# quicksight/user_test.go: format verb as resource name (%[1]q). https://github.com/katbyte/terrafmt/issues/48 | |
# sns/platform_application_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
# resource_aws_efs_file_system_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
# resource_aws_kms_grant_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
# resource_aws_quicksight_user_test.go: format verb as resource name (%[1]q). https://github.com/katbyte/terrafmt/issues/48 | |
# resource_aws_sns_platform_application_test.go: argument name is format verb and replaced with quoted string. https://github.com/katbyte/terrafmt/issues/47 | |
find ./internal/service -type f -name '*_test.go' \ | |
| sort -u \ | |
| grep -v efs/file_system_test.go \ | |
| grep -v kms/grant_test.go \ | |
| grep -v lambda/permission_test.go \ | |
| grep -v quicksight/user_test.go \ | |
| grep -v sns/platform_application_test.go \ | |
| ./scripts/validate-terraform.sh |