-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c274954
commit 2fd5f12
Showing
32 changed files
with
2,235 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Copyright 2022 KhulnaSoft, Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 | ||
groups: | ||
golang-org-x: | ||
patterns: | ||
- "golang.org/x/*" | ||
k8s-io: | ||
patterns: | ||
- "k8s.io/*" | ||
- "sigs.k8s.io/*" | ||
otel: | ||
patterns: | ||
- "go.opentelemetry.io/*" | ||
prom: | ||
patterns: | ||
- "github.com/prometheus/*" | ||
grpc: | ||
patterns: | ||
- "github.com/grpc-ecosystem/*" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
open-pull-requests-limit: 10 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2022 KhulnaSoft, Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Action Lint | ||
|
||
on: | ||
pull_request: | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
action-lint: | ||
name: Action lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Find yamls | ||
id: get_yamls | ||
run: | | ||
set -x | ||
set -e | ||
mapfile -t yamls < <(find .github/workflows -name "*.y*ml" | grep -v dependabot.) | ||
echo "files=${yamls[*]}" >> "${GITHUB_OUTPUT}" | ||
- name: Action lint | ||
uses: reviewdog/action-actionlint@7eeec1dd160c2301eb28e1568721837d084558ad # v1.57.0 | ||
with: | ||
actionlint_flags: ${{ steps.get_yamls.outputs.files }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright 2022 KhulnaSoft, Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Boilerplate | ||
|
||
on: | ||
pull_request: | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
check: | ||
name: Boilerplate Check | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false # Keep running if one leg fails. | ||
matrix: | ||
extension: | ||
- go | ||
- sh | ||
- yaml | ||
|
||
# Map between extension and human-readable name. | ||
include: | ||
- extension: go | ||
language: Go | ||
- extension: sh | ||
language: Bash | ||
- extension: yaml | ||
language: YAML | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- uses: khulnasoft/actions/boilerplate@main | ||
with: | ||
extension: ${{ matrix.extension }} | ||
language: ${{ matrix.language }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2022 KhulnaSoft, Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Do Not Submit | ||
|
||
on: | ||
pull_request: | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
donotsubmit: | ||
name: Do Not Submit | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Do Not Submit | ||
uses: khulnasoft/actions/donotsubmit@main |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright 2022 KhulnaSoft, Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Test | ||
|
||
on: | ||
pull_request: | ||
branches: [ 'main', 'release-*' ] | ||
push: | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code onto GOPATH | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds | ||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
# In order: | ||
# * Module download cache | ||
# * Build cache (Linux) | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: './go.mod' | ||
check-latest: true | ||
|
||
- run: | | ||
go test -race ./... |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# Copyright 2022 KhulnaSoft, Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Code Style | ||
|
||
on: | ||
pull_request: | ||
branches: [ 'main', 'release-*' ] | ||
push: | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
gofmt: | ||
name: check gofmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: './go.mod' | ||
check-latest: true | ||
|
||
- uses: khulnasoft/actions/gofmt@main | ||
with: | ||
args: -s | ||
|
||
goimports: | ||
name: check goimports | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: './go.mod' | ||
check-latest: true | ||
|
||
- uses: khulnasoft/actions/goimports@main | ||
|
||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: './go.mod' | ||
check-latest: true | ||
cache: true | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.60 | ||
args: --timeout=5m | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: './go.mod' | ||
check-latest: true | ||
|
||
- uses: khulnasoft/actions/trailing-space@main | ||
if: ${{ always() }} | ||
|
||
- uses: khulnasoft/actions/eof-newline@main | ||
if: ${{ always() }} | ||
|
||
- uses: reviewdog/action-tflint@master | ||
if: ${{ always() }} | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
fail_on_error: true | ||
|
||
- uses: reviewdog/action-misspell@ef8b22c1cca06c8d306fc6be302c3dab0f6ca12f # v1.23.0 | ||
if: ${{ always() }} | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
fail_on_error: true | ||
locale: "US" | ||
exclude: | | ||
**/go.sum | ||
**/third_party/** | ||
./*.yml | ||
- uses: get-woke/woke-action-reviewdog@d71fd0115146a01c3181439ce714e21a69d75e31 # v0 | ||
if: ${{ always() }} | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
reporter: github-pr-check | ||
level: error | ||
fail-on-error: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright 2022 KhulnaSoft, Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
name: Verify | ||
|
||
on: | ||
pull_request: | ||
branches: [ 'main', 'release-*' ] | ||
push: | ||
branches: [ 'main', 'release-*' ] | ||
|
||
jobs: | ||
|
||
verify: | ||
name: Verify Codegen | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GOPATH: ${{ github.workspace }} | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
path: ./src/github.com/${{ github.repository }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 | ||
with: | ||
go-version-file: './src/github.com/${{ github.repository }}/go.mod' | ||
check-latest: true | ||
|
||
# https://github.com/mvdan/github-actions-golang#how-do-i-set-up-caching-between-builds | ||
- uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2 | ||
with: | ||
# In order: | ||
# * Module download cache | ||
# * Build cache (Linux) | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Update Codegen | ||
shell: bash | ||
working-directory: ./src/github.com/${{ github.repository }} | ||
run: | | ||
./hack/update-codegen.sh | ||
- name: Verify | ||
uses: khulnasoft/actions/nodiff@main | ||
with: | ||
path: ./src/github.com/${{ github.repository }} | ||
fixup-command: "./hack/update-codegen.sh" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Editor files | ||
.idea/ | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright 2022 KhulnaSoft, Ltd. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
linters: | ||
enable: | ||
- asciicheck | ||
- unused | ||
- errcheck | ||
- errorlint | ||
- gofmt | ||
- goimports | ||
- gosec | ||
- gocritic | ||
- importas | ||
- prealloc | ||
- revive | ||
- misspell | ||
- stylecheck | ||
- tparallel | ||
- unconvert | ||
- unparam | ||
- whitespace | ||
output: | ||
uniq-by-line: false | ||
issues: | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- errcheck | ||
- gosec | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
run: | ||
issues-exit-code: 1 | ||
timeout: 10m |
Oops, something went wrong.