Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable tflint workflow & fix linting #19365

Merged
merged 13 commits into from
Dec 8, 2022
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/automation-open-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
name: Open Pull Request when an `auto-pr` is pushed

on:
push:
branches:
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/depscheck.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
---
name: Vendor Dependencies Check

permissions:
contents: read

on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/**'
- '**.go'
- '.github/workflows/depscheck.yaml'
- 'vendor/**'
- '.github/workflows/**'
- '**.go'

jobs:
depscheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version-file: .go-version
- run: bash scripts/gogetcookie.sh
- run: make depscheck
12 changes: 6 additions & 6 deletions .github/workflows/gencheck.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
name: Generation Check

permissions:
contents: read

on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/**'
- '.github/workflows/gencheck.yaml'
- '**.go'
- 'azurerm/**'
- '.github/workflows/**'

concurrency:
group: 'gencheck-${{ github.head_ref }}'
cancel-in-progress: true

jobs:
gencheck:
runs-on: ubuntu-latest
runs-on: [custom, linux, large]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version-file: .go-version
- run: bash scripts/gogetcookie.sh
- run: make gencheck
17 changes: 9 additions & 8 deletions .github/workflows/golint.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
---
name: GoLang Linting

permissions:
contents: read

on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/**'
- '**.go'
- '.github/workflows/golint.yaml'
- 'vendor/**'
- '.github/workflows/**'
- '**.go'

concurrency:
group: 'golint-${{ github.head_ref }}'
cancel-in-progress: true

jobs:
golint:
runs-on: ubuntu-latest
runs-on: [custom, linux, large]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
- uses: golangci/golangci-lint-action@v2
go-version-file: .go-version
- uses: golangci/golangci-lint-action@v3
with:
version: 'v1.45.0'
version: 'v1.50.1'
args: -v
8 changes: 5 additions & 3 deletions .github/workflows/gradually-deprecated.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
---
name: Check for new usages of deprecated functionality

permissions:
contents: read

on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/**'
- '.github/workflows/gradually-deprecated.yaml'
- '**.go'

jobs:
Expand All @@ -16,7 +18,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version-file: .go-version
- run: ./scripts/run-gradually-deprecated.sh
2 changes: 2 additions & 0 deletions .github/workflows/issue-comment-created.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Issue Comment Created Triage

on:
Expand Down Expand Up @@ -26,6 +27,7 @@ jobs:
with:
github_token: "${{ secrets.GITHUB_TOKEN }}"
labels: waiting-response

pull_request_comment:
runs-on: ubuntu-latest
if: github.event.issue.pull_request && endsWith(github.event.comment.body, '/wr')
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/issue-opened.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Issue Opened Triage

permissions:
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/link-milestone.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
name: Link Milestone

on:
pull_request_target:
branches: [main]
Expand All @@ -14,9 +15,9 @@ jobs:
pull-requests: write
issues: write
steps:
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version-file: .go-version
- run: |
go install github.com/stephybun/link-milestone@latest
link-milestone
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lock.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: 'Lock Threads'

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/milestone-closed.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Closed Milestones

on:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: "Pull Request Triage"

permissions:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Release

on:
Expand All @@ -9,14 +10,6 @@ permissions:
contents: write

jobs:
go-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.go-version.outputs.version }}
steps:
- uses: actions/checkout@v3
- id: go-version
run: echo "::set-output name=version::$(cat ./.go-version)"
release-notes:
runs-on: ubuntu-latest
steps:
Expand All @@ -30,10 +23,11 @@ jobs:
name: release-notes
path: release-notes.txt
retention-days: 1

terraform-provider-release:
name: 'Terraform Provider Release'
needs: [go-version, release-notes]
uses: hashicorp/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@v2
uses: manicminer/ghaction-terraform-provider-release/.github/workflows/hashicorp.yml@1dba3fa320b576c92d2206c9514e5f9622730010
secrets:
hc-releases-github-token: '${{ secrets.HASHI_RELEASES_GITHUB_TOKEN }}'
hc-releases-host-staging: '${{ secrets.HC_RELEASES_HOST_STAGING }}'
Expand All @@ -48,6 +42,6 @@ jobs:
goreleaser-release-args: --timeout 2h
hc-releases-aws-role-duration-seconds: 7200
release-notes: true
setup-go-version: '${{ needs.go-version.outputs.version }}'
setup-go-version-file: .go-version
# Product Version (e.g. v1.2.3 or github.ref_name)
product-version: '${{ github.ref_name }}'
9 changes: 5 additions & 4 deletions .github/workflows/teamcity-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/workflows/teamcity-test.yaml'
- '!.teamcity/components/generated/**'
- '!.teamcity/target/**'
- '.teamcity/**'
- '.github/workflows/**'

concurrency:
group: 'tctest-${{ github.head_ref }}'
Expand All @@ -22,11 +22,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v1
- uses: actions/setup-java@v2
with:
java-version: '11'
distribution: zulu
java-version: 11
java-package: jdk
- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tflint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/**'
- '**.go'
- '.github/workflows/tflint.yaml'
- 'vendor/**'
- '.github/workflows/**'
- '**.go'

concurrency:
group: 'tflint-${{ github.head_ref }}'
Expand All @@ -20,11 +19,12 @@ concurrency:
jobs:
tflint:
runs-on: ubuntu-latest
if: false # skip until https://github.com/bflad/tfproviderlint/issues/255 is fixed
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version-file: .go-version
- run: bash scripts/gogetcookie.sh
- run: make tools
- run: make tflint
9 changes: 4 additions & 5 deletions .github/workflows/thirty-two-bit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/**'
- '**.go'
- '.github/workflows/thirty-two-bit.yaml'
- 'vendor/**'
- '.github/workflows/**'
- '**.go'

concurrency:
group: 'thirtytwo-${{ github.head_ref }}'
Expand All @@ -23,8 +22,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version-file: .go-version
- run: bash scripts/gogetcookie.sh
- run: GOARCH=386 GOOS=linux go build -o 32bitbuild .
10 changes: 5 additions & 5 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '**.go'
- '.github/workflows/unit-test.yaml'
- 'vendor/**'
- '.github/workflows/**'
- '**.go'

concurrency:
group: 'unit-${{ github.head_ref }}'
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
runs-on: [custom, linux, large]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version-file: .go-version
- run: bash scripts/gogetcookie.sh
- run: make test
env:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/validate-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request:
types: ['opened', 'synchronize']
paths:
- '.github/workflows/**'
- '.github/workflows/validate-examples.yaml'
- 'examples/**'

concurrency:
Expand All @@ -18,12 +18,12 @@ concurrency:

jobs:
website-lint:
runs-on: ubuntu-latest
runs-on: [custom, linux, large]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: '1.19.3'
go-version-file: .go-version
- run: bash scripts/gogetcookie.sh
- run: make tools
- run: make validate-examples
6 changes: 3 additions & 3 deletions .github/workflows/website-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ on:
pull_request:
types: ["opened", "synchronize"]
paths:
- ".github/workflows/website-lint.yaml"
- "website/**"
- ".github/workflows/**"

jobs:
website-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v2
- uses: actions/setup-go@v3
with:
go-version: "1.19.3"
go-version-file: .go-version
- run: bash scripts/gogetcookie.sh
- run: make tools
- run: make website-lint
Loading