forked from open-policy-agent/gatekeeper
-
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.
chore: update lint (open-policy-agent#3338)
Signed-off-by: Sertac Ozercan <[email protected]>
- Loading branch information
1 parent
dae7514
commit 1dd8ed1
Showing
30 changed files
with
270 additions
and
170 deletions.
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,53 @@ | ||
name: check-manifest | ||
on: | ||
push: | ||
paths-ignore: | ||
- ".github/workflows/website.yaml" | ||
- "docs/**" | ||
- "library/**" | ||
- "demo/**" | ||
- "deprecated/**" | ||
- "example/**" | ||
- "website/**" | ||
- "**.md" | ||
- "!cmd/build/helmify/static/README.md" | ||
pull_request: | ||
paths-ignore: | ||
- ".github/workflows/website.yaml" | ||
- "docs/**" | ||
- "library/**" | ||
- "demo/**" | ||
- "deprecated/**" | ||
- "example/**" | ||
- "website/**" | ||
- "**.md" | ||
- "!cmd/build/helmify/static/README.md" | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
check_manifest: | ||
name: "Check codegen and manifest" | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version: "1.22" | ||
check-latest: true | ||
- name: Check go.mod and manifests | ||
run: | | ||
# there should be no additional manifest or go.mod changes | ||
go mod tidy | ||
git diff --exit-code | ||
make generate manifests | ||
git diff --exit-code |
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
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,43 @@ | ||
name: lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- ".github/workflows/website.yaml" | ||
- "docs/**" | ||
- "library/**" | ||
- "demo/**" | ||
- "deprecated/**" | ||
- "example/**" | ||
- "website/**" | ||
- "**.md" | ||
pull_request: | ||
branches: | ||
- master | ||
paths-ignore: | ||
- ".github/workflows/website.yaml" | ||
- "docs/**" | ||
- "library/**" | ||
- "demo/**" | ||
- "deprecated/**" | ||
- "example/**" | ||
- "website/**" | ||
- "**.md" | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: lint | ||
run: make lint |
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
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,59 @@ | ||
name: build_test | ||
on: | ||
push: | ||
paths-ignore: | ||
- ".github/workflows/website.yaml" | ||
- "docs/**" | ||
- "library/**" | ||
- "demo/**" | ||
- "deprecated/**" | ||
- "example/**" | ||
- "website/**" | ||
- "**.md" | ||
- "!cmd/build/helmify/static/README.md" | ||
pull_request: | ||
paths-ignore: | ||
- ".github/workflows/website.yaml" | ||
- "docs/**" | ||
- "library/**" | ||
- "demo/**" | ||
- "deprecated/**" | ||
- "example/**" | ||
- "website/**" | ||
- "**.md" | ||
- "!cmd/build/helmify/static/README.md" | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
gator_test: | ||
name: "Test Gator" | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
KUBERNETES_VERSION: ["1.26.3", "1.27.1", "1.28.0", "1.29.0"] | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version: "1.22" | ||
check-latest: true | ||
|
||
- name: Download e2e dependencies | ||
run: | | ||
mkdir -p $GITHUB_WORKSPACE/bin | ||
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH | ||
make e2e-dependencies KUBERNETES_VERSION=${{ matrix.KUBERNETES_VERSION }} | ||
- name: gator test | ||
run: make test-gator-containerized |
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,56 @@ | ||
name: unit-test | ||
on: | ||
push: | ||
paths-ignore: | ||
- ".github/workflows/website.yaml" | ||
- "docs/**" | ||
- "library/**" | ||
- "demo/**" | ||
- "deprecated/**" | ||
- "example/**" | ||
- "website/**" | ||
- "**.md" | ||
- "!cmd/build/helmify/static/README.md" | ||
pull_request: | ||
paths-ignore: | ||
- ".github/workflows/website.yaml" | ||
- "docs/**" | ||
- "library/**" | ||
- "demo/**" | ||
- "deprecated/**" | ||
- "example/**" | ||
- "website/**" | ||
- "**.md" | ||
- "!cmd/build/helmify/static/README.md" | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
test: | ||
name: "Unit test" | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 20 | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version: "1.22" | ||
check-latest: true | ||
|
||
- name: Unit test | ||
run: make native-test | ||
|
||
- name: Codecov Upload | ||
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0 | ||
with: | ||
flags: unittests | ||
file: ./cover.out | ||
fail_ci_if_error: false |
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
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
run: | ||
timeout: 5m | ||
skip-files: | ||
|
||
issues: | ||
exclude-files: | ||
- pkg/target/matchcrd_constant.go | ||
|
||
linters-settings: | ||
|
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
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
Oops, something went wrong.