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

chore: Refactored tooling for best practices #2193

Merged
merged 2 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
groups:
github-actions:
patterns:
- "*"
update-types:
- minor
- patch
Comment on lines +9 to +11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not include major version updates here and below? Shouldn't the PR fire so we're aware the update exists even if we don't want to take it immediately?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this config major version updates will be managed in individual PRs while minor and patch updates will be grouped in a single PR per ecosystem.

schedule:
interval: "weekly"
interval: weekly

- package-ecosystem: "gomod"
directory: "/"
- package-ecosystem: gomod
directory: /
groups:
gomod:
patterns:
- "*"
update-types:
- minor
- patch
schedule:
interval: "weekly"
interval: weekly
2 changes: 1 addition & 1 deletion .github/workflows/add_to_octokit_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/add-to-project@v0.6.1
- uses: actions/add-to-project@1b844f0c5ac6446a402e0cb3693f9be5eca188c5 # v0.6.1
with:
project-url: https://github.com/orgs/octokit/projects/10
github-token: ${{ secrets.OCTOKITBOT_PROJECT_ACTION_TOKEN }}
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ jobs:
env:
GITHUB_TEST_ORGANIZATION: 'kfcampbell-terraform-provider'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true
- run: make tools
- run: make lint
- run: make website-lint
Expand Down
40 changes: 21 additions & 19 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,24 @@ jobs:
language: [ 'go' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: 'go.mod'
cache: true

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8a470fddafa5cbb6266ee11b37ef4d8aae19c571 # v3.24.6
with:
category: "/language:${{matrix.language}}"
31 changes: 17 additions & 14 deletions .github/workflows/dotcom-acceptance-tests-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true
- name: Acceptance Tests (Anonymous)
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO
RUN_ALL: true
Expand All @@ -33,17 +34,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true

- name: Acceptance Tests (Individual)
id: acceptance-tests-individual
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO
RUN_ALL: true
Expand All @@ -53,7 +55,7 @@ jobs:

- name: Failed Acceptance Tests (Individual)
if: ${{ failure() }}
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: DEBUG
RUN_ALLOWED: ${{ steps.acceptance-tests-individual.outputs.failed }}
Expand All @@ -65,17 +67,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true

- name: Acceptance Tests (Organization)
id: acceptance-tests-organization
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO
RUN_ALL: true
Expand All @@ -84,7 +87,7 @@ jobs:
GITHUB_TEST_OWNER: github-terraform-test-user

- name: Failed Acceptance Tests (Organization)
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
if: ${{ failure() }}
with:
TF_LOG: DEBUG
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/dotcom-acceptance-tests-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,22 @@ jobs:
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2
)"
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true
- name: Acceptance Tests (Anonymous)
id: acceptance-tests-anonymous
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }}
- name: Failed Acceptance Tests (Anonymous)
if: ${{ failure() }}
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: DEBUG
RUN_ALLOWED: ${{ steps.acceptance-tests-anonymous.outputs.run_allowed }}
Expand All @@ -48,15 +49,16 @@ jobs:
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2
)"
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true
- name: Acceptance Tests (Individual)
id: acceptance-tests-individual
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }}
Expand All @@ -65,7 +67,7 @@ jobs:
GITHUB_TEST_ORGANIZATION: terraformtesting
- name: Failed Acceptance Tests (Individual)
if: ${{ failure() }}
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: DEBUG
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }}
Expand All @@ -84,16 +86,17 @@ jobs:
jq -rc .label.name $GITHUB_EVENT_PATH | cut -d/ -f 2
)"
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true

- name: Acceptance Tests (Organization)
id: acceptance-tests-organization
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }}
Expand All @@ -102,14 +105,11 @@ jobs:
GITHUB_TEST_OWNER: github-terraform-test-user

- name: Failed Acceptance Tests (Organization)
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
if: ${{ failure() }}
with:
TF_LOG: DEBUG
RUN_ALLOWED: ${{ steps.args.outputs.run_allowed }}
GITHUB_ORGANIZATION: terraformtesting
GITHUB_TEST_USER_TOKEN: ${{ secrets.DOTCOM_TEST_USER_TOKEN }}
GITHUB_TEST_OWNER: github-terraform-test-user



22 changes: 12 additions & 10 deletions .github/workflows/dotcom-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- name: Acceptance Tests (Anonymous)
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO

acceptance-tests-individual:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true
- name: Acceptance Tests (Individual)
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO
GITHUB_OWNER: github-terraform-test-user
Expand All @@ -43,15 +44,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 2
- uses: actions/setup-go@v5
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version-file: 'go.mod'
cache: true
- name: Acceptance Tests (Organization)
uses: terraformtesting/acceptance-tests@v2.2.0
uses: terraformtesting/acceptance-tests@66f4842d934555dde0f59bf1a00abd0fc710ece4 # v2.2.0
with:
TF_LOG: INFO
GITHUB_ORGANIZATION: terraformtesting
Expand Down
Loading
Loading