Skip to content

build(deps): bump actions/cache from 2 to 4 #52

build(deps): bump actions/cache from 2 to 4

build(deps): bump actions/cache from 2 to 4 #52

name: Acceptance Test Linting
on:
push:
branches:
- master
- "release/**"
pull_request:
paths:
- .github/workflows/acctest-terraform-lint.yml
- .go-version
- aws/*_test.go
- scripts/validate-terraform.sh
- tools/go.mod
env:
GO111MODULE: on
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@v4
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: terrafmt diff ./aws --check --pattern '*_test.go' --fmtcompat
- run: |
find ./aws -type f -name '*_test.go' \
| sort -u \
| grep -v resource_aws_apigatewayv2_domain_name_test.go \
| grep -v resource_aws_ecs_capacity_provider_test.go \
| grep -v resource_aws_efs_file_system_test.go \
| grep -v resource_aws_kinesis_stream_test.go \
| grep -v resource_aws_kms_grant_test.go \
| grep -v resource_aws_quicksight_user_test.go \
| grep -v resource_aws_s3_bucket_object_test.go \
| grep -v resource_aws_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: ${{ steps.go-version.outputs.content }}
- uses: actions/cache@v4
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
- run: |
find ./aws -type f -name '*_test.go' \
| sort -u \
| grep -v resource_aws_apigatewayv2_domain_name_test.go \
| grep -v resource_aws_ecs_capacity_provider_test.go \
| grep -v resource_aws_efs_file_system_test.go \
| grep -v resource_aws_elasticache_cluster_test.go \
| grep -v resource_aws_kinesis_stream_test.go \
| grep -v resource_aws_kms_grant_test.go \
| grep -v resource_aws_lambda_permission_test.go \
| grep -v resource_aws_quicksight_user_test.go \
| grep -v resource_aws_s3_bucket_object_test.go \
| grep -v resource_aws_sns_platform_application_test.go \
| ./scripts/validate-terraform.sh