diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..426fc4489 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ + + +**What this PR does / why we need it**: + +**Which issue(s) this PR fixes** _(optional, in `Fixes #, #, ...` format, will close the issue(s) when PR gets merged)_: +Fixes # \ No newline at end of file diff --git a/.github/workflows/test-go.yaml b/.github/workflows/test-go.yaml new file mode 100644 index 000000000..b900776f7 --- /dev/null +++ b/.github/workflows/test-go.yaml @@ -0,0 +1,42 @@ +name: Go generate Test + +on: + - push + - pull_request + +jobs: + test: + name: Test + runs-on: ubuntu-latest + env: + GOPATH: ${{ github.workspace }}/go + defaults: + run: + working-directory: ${{ env.GOPATH }}/src/github.com/kubeflow/arena + + steps: + - name: Check out code + uses: actions/checkout@v3 + with: + path: ${{ env.GOPATH }}/src/github.com/kubeflow/arena + + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version-file: ${{ env.GOPATH }}/src/github.com/kubeflow/arena/go.mod + + - name: Check Go modules + run: | + go mod tidy && git add go.* && + git diff --cached --exit-code || (echo 'Please run "go mod tidy" to sync Go modules' && exit 1); + - name: Verify gofmt + run: | + make fmt && git add pkg cmd && + git diff --cached --exit-code || (echo 'Please run "make fmt" to verify gofmt' && exit 1); + - name: Verify govet + run: | + make vet && git add pkg cmd && + git diff --cached --exit-code || (echo 'Please run "make vet" to verify govet' && exit 1); + - name: Verify golint + run: | + make golangci-lint diff --git a/go.mod b/go.mod index 6e5b19d01..d69eb1ee5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.18 require ( github.com/docker/docker v20.10.12+incompatible github.com/golang/glog v1.0.0 - github.com/golang/protobuf v1.5.3 github.com/google/uuid v1.3.0 github.com/kserve/kserve v0.10.0 github.com/mitchellh/go-homedir v1.1.0 @@ -16,6 +15,7 @@ require ( github.com/spf13/viper v1.10.0 github.com/stretchr/testify v1.8.1 golang.org/x/crypto v0.0.0-20220214200702-86341886e292 + google.golang.org/protobuf v1.28.1 gopkg.in/yaml.v2 v2.4.0 istio.io/api v0.0.0-20200715212100-dbf5277541ef k8s.io/api v0.23.9 @@ -54,6 +54,7 @@ require ( github.com/go-openapi/swag v0.22.3 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.3 // indirect github.com/google/btree v1.0.1 // indirect github.com/google/go-cmp v0.5.8 // indirect github.com/google/go-containerregistry v0.8.1-0.20220414143355-892d7a808387 // indirect @@ -113,7 +114,6 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959 // indirect google.golang.org/grpc v1.48.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.66.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/license.txt b/license.txt deleted file mode 100644 index 58e6742e2..000000000 --- a/license.txt +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2018 The Kubeflow Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// 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. \ No newline at end of file