Upgrade Go version to v1.19 (#497)
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com> Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
This commit is contained in:
parent
dc36350d99
commit
85ed6442ca
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
|
|
|||
|
|
@ -5,17 +5,19 @@ on:
|
|||
- v*
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request:
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.50.1
|
||||
args: --timeout=5m
|
||||
args: --timeout=5m --go=1.19
|
||||
only-new-issues: true
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ jobs:
|
|||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
steps:
|
||||
- name: Clone the code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '^1.13'
|
||||
go-version-file: 'go.mod'
|
||||
- name: fmt check
|
||||
run: make fmt
|
||||
- name: go mod tidy
|
||||
|
|
@ -28,10 +28,10 @@ jobs:
|
|||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
steps:
|
||||
- name: Clone the code
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v2
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '^1.15'
|
||||
go-version-file: go.mod
|
||||
- name: Run tests
|
||||
run: make RELEASE_VERSION=test CONTROLLER_VERSION=v2 test_e2e
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ git clone https://github.com/${GITHUB_USER}/mpi-operator.git
|
|||
|
||||
## Install Dependencies
|
||||
|
||||
We use Go v1.15+ for development and use [Go Modules](https://blog.golang.org/using-go-modules) to download and install the dependencies.
|
||||
We use Go v1.19+ for development and use [Go Modules](https://blog.golang.org/using-go-modules) to download and install the dependencies.
|
||||
|
||||
## Run tests
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.17.7 AS build
|
||||
FROM golang:1.19 AS build
|
||||
|
||||
# Set mpi-operator version
|
||||
# Defaults to v2
|
||||
|
|
|
|||
6
Makefile
6
Makefile
|
|
@ -78,7 +78,7 @@ test_images:
|
|||
|
||||
.PHONY: tidy
|
||||
tidy:
|
||||
go mod tidy -compat 1.17
|
||||
go mod tidy -go 1.19
|
||||
|
||||
GOLANGCI_LINT = ./bin/golangci-lint
|
||||
bin/golangci-lint:
|
||||
|
|
@ -100,7 +100,7 @@ bin/kubectl:
|
|||
|
||||
.PHONY: lint
|
||||
lint: bin/golangci-lint ## Run golangci-lint linter
|
||||
$(GOLANGCI_LINT) run --new-from-rev=origin/master
|
||||
$(GOLANGCI_LINT) run --new-from-rev=origin/master --go 1.19
|
||||
|
||||
.PHONY: kind
|
||||
kind:
|
||||
|
|
@ -126,4 +126,4 @@ echo "Downloading $(2)" ;\
|
|||
GOBIN=$(PROJECT_DIR)/bin go get $(2) ;\
|
||||
rm -rf $$TMP_DIR ;\
|
||||
}
|
||||
endef
|
||||
endef
|
||||
|
|
|
|||
2
go.mod
2
go.mod
|
|
@ -1,6 +1,6 @@
|
|||
module github.com/kubeflow/mpi-operator/v2
|
||||
|
||||
go 1.17
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/go-openapi/spec v0.20.3
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
// of clientsets, like in:
|
||||
//
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ var localSchemeBuilder = runtime.SchemeBuilder{
|
|||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
// of clientsets, like in:
|
||||
//
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
// import (
|
||||
// "k8s.io/client-go/kubernetes"
|
||||
// clientsetscheme "k8s.io/client-go/kubernetes/scheme"
|
||||
// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme"
|
||||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
|
|
|
|||
Loading…
Reference in New Issue