Skip to content

Commit

Permalink
Merge pull request #109 from hiddenmarten/master
Browse files Browse the repository at this point in the history
  • Loading branch information
chrislusf authored Jun 16, 2024
2 parents e1caf4c + a822555 commit 2cf0661
Show file tree
Hide file tree
Showing 27 changed files with 237 additions and 278 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/go.yml

This file was deleted.

74 changes: 0 additions & 74 deletions .github/workflows/main.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/make-test-e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#name: Make run tests e2e
#
#on:
# pull_request:
# types:
# - opened
# - labeled
# - synchronize
#
#jobs:
# test-e2e:
# name: test-e2e on k8s ${{ matrix.k8s.attribute }} version
# # Pull request has label 'ok-to-test' or the author is a member of the organization
# if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(fromJSON('["COLLABORATOR", "MEMBER", "OWNER"]'), github.event.pull_request.author_association)
# strategy:
# matrix:
# k8s:
# - version: v1.28.0
# attribute: penultimate
# - version: v1.29.0
# attribute: previous
# - version: default
# attribute: latest
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4.1.7
# - uses: actions/setup-go@v5.0.1
# with:
# go-version: 1.22.4
# - uses: docker/setup-buildx-action@v3.3.0
# - uses: tale/kubectl-action@v1.4.0
# with:
# kubectl-version: v1.30.0
# # Empty kubeconfig file
# base64-kube-config: "YXBpVmVyc2lvbjogdjEKa2luZDogQ29uZmlnCnByZWZlcmVuY2VzOiB7fQo="
# - run: |
# if [ "${{ matrix.k8s.version }}" = "default" ]; then
# # For latest version use default from Makefile
# make test-e2e
# else
# K8S_VERSION=${{ matrix.k8s.version }} make test-e2e
# fi
36 changes: 36 additions & 0 deletions .github/workflows/make-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#name: Make run tests
#
#on:
# pull_request:
# types:
# - opened
# - labeled
# - synchronize
#
#jobs:
# test:
# name: test on k8s ${{ matrix.k8s.attribute }} version
# # Pull request has label 'ok-to-test' or the author is a member of the organization
# if: contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(fromJSON('["COLLABORATOR", "MEMBER", "OWNER"]'), github.event.pull_request.author_association)
# strategy:
# matrix:
# k8s:
# - version: v1.28.0
# attribute: penultimate
# - version: v1.29.0
# attribute: previous
# - version: default
# attribute: latest
# runs-on: ubuntu-22.04
# steps:
# - uses: actions/checkout@v4.1.7
# - uses: actions/setup-go@v5.0.1
# with:
# go-version: 1.22.4
# - run: |
# if [ "${{ matrix.k8s.version }}" = "default" ]; then
# # For latest version use default from Makefile
# make test
# else
# K8S_VERSION=${{ matrix.k8s.version }} make test
# fi
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pre-commit

on:
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4.1.7
- uses: actions/setup-go@v5.0.1
with:
go-version: 1.22.4
- uses: pre-commit/action@v3.0.1
35 changes: 0 additions & 35 deletions .github/workflows/verify.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
run:
deadline: 5m
allow-parallel-runners: true

issues:
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
# restore some of the defaults
# (fill in the rest as needed)
exclude-rules:
- path: "api/*"
linters:
- lll
- path: "internal/*"
linters:
- dupl
- lll
linters:
disable-all: true
enable:
- dupl
- errcheck
- exportloopref
- goconst
- gocyclo
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- prealloc
- staticcheck
- typecheck
- unconvert
- unparam
- unused
61 changes: 61 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: "^deploy/helm/(values.schema.json|README.md)$"
- id: check-added-large-files
- repo: local
hooks:
- id: make-fmt
name: make-fmt
entry: sh -c "make fmt"
language: system
- id: make-vet
name: make-vet
entry: sh -c "make vet"
language: system
require_serial: true
- id: make-nilaway-lint
name: make-nilaway-lint
entry: sh -c "make nilaway-lint"
language: system
require_serial: true
# - id: make-lint-fix
# name: make-lint-fix
# entry: sh -c "make lint-fix"
# language: system
# require_serial: true
# - id: make-generate-docs
# name: make-generate-docs
# entry: sh -c "make generate-docs"
# language: system
# require_serial: true
# - id: make-mod-tidy
# name: make-mod-tidy
# entry: sh -c "make mod-tidy"
# language: system
# require_serial: true
# - id: make-helm-lint
# name: make-helm-lint
# entry: sh -c "make helm-lint"
# language: system
# require_serial: true
# - id: make-helm-schema-run
# name: make-helm-schema-run
# entry: sh -c "make helm-schema-run"
# language: system
# require_serial: true
# - id: make-helm-docs-run
# name: make-helm-docs-run
# entry: sh -c "make helm-docs-run"
# language: system
# require_serial: true
# - id: make-helm-crd-copy
# name: make-helm-crd-copy
# entry: sh -c "make helm-crd-copy"
# language: system
# require_serial: true
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
Loading

0 comments on commit 2cf0661

Please sign in to comment.