File tree Expand file tree Collapse file tree 14 files changed +81
-21
lines changed Expand file tree Collapse file tree 14 files changed +81
-21
lines changed Original file line number Diff line number Diff line change
1
+ name : Verify Generated Files and Import Organization
2
+ on :
3
+ push :
4
+ branches :
5
+ - ' **'
6
+ paths :
7
+ - ' **.go'
8
+ - ' **go.mod'
9
+ - ' **go.sum'
10
+ tags-ignore :
11
+ - ' v*'
12
+ pull_request :
13
+ paths :
14
+ - ' **.go'
15
+ - ' **go.mod'
16
+ - ' **go.sum'
17
+ jobs :
18
+ verify-imports :
19
+ runs-on : ubuntu-latest
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+ - name : Set Go
23
+ uses : actions/setup-go@v5
24
+ with :
25
+ go-version-file : ' ./go.mod'
26
+ - name : Verify that imports are organized
27
+ run : make verify-imports
Original file line number Diff line number Diff line change @@ -13,4 +13,24 @@ setup-kfto: ## Set up Training operator for e2e tests.
13
13
kubectl create namespace opendatahub --dry-run=client -o yaml | kubectl apply -f -
14
14
kubectl apply -k " github.com/opendatahub-io/training-operator/manifests/rhoai"
15
15
echo " Wait for Training operator deployment"
16
- kubectl -n opendatahub wait --timeout=300s --for=condition=Available deployments --all
16
+ kubectl -n opendatahub wait --timeout=300s --for=condition=Available deployments --all
17
+
18
+ # # Location to install dependencies to
19
+ LOCALBIN ?= $(shell pwd) /bin
20
+ $(LOCALBIN ) :
21
+ mkdir -p $(LOCALBIN )
22
+
23
+ OPENSHIFT-GOIMPORTS ?= $(LOCALBIN ) /openshift-goimports
24
+
25
+ .PHONY : openshift-goimports
26
+ openshift-goimports : $(OPENSHIFT-GOIMPORTS ) # # Download openshift-goimports locally if necessary.
27
+ $(OPENSHIFT-GOIMPORTS ) : $(LOCALBIN )
28
+ test -s $(LOCALBIN ) /openshift-goimports || GOBIN=$(LOCALBIN ) go install github.com/openshift-eng/openshift-goimports@latest
29
+
30
+ .PHONY : imports
31
+ imports : openshift-goimports # # Organize imports in go files using openshift-goimports. Example: make imports
32
+ $(OPENSHIFT-GOIMPORTS )
33
+
34
+ .PHONY : verify-imports
35
+ verify-imports : openshift-goimports # # Run import verifications.
36
+ ./hack/verify-imports.sh $(OPENSHIFT-GOIMPORTS )
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ OPENSHIFT_GOIMPORTS=${1}
3
+
4
+ # ${OPENSHIFT_GOIMPORTS} -l
5
+ bad_files=$( ${OPENSHIFT_GOIMPORTS} -l)
6
+
7
+ echo $bad_files
8
+ if [[ -n ${bad_files} ]]; then
9
+ echo " !!! openshift-goimports needs to be run on the following files:"
10
+ echo " ${bad_files} "
11
+ echo " Try running 'make imports'"
12
+ exit 1
13
+ fi
Original file line number Diff line number Diff line change @@ -21,17 +21,17 @@ import (
21
21
"testing"
22
22
"time"
23
23
24
+ kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
24
25
. "github.com/onsi/gomega"
25
- "github.com/opendatahub-io/distributed-workloads/tests/kfto"
26
26
. "github.com/project-codeflare/codeflare-common/support"
27
+ prometheusapiv1 "github.com/prometheus/client_golang/api/prometheus/v1"
28
+ prometheusmodel "github.com/prometheus/common/model"
27
29
28
30
corev1 "k8s.io/api/core/v1"
29
31
"k8s.io/apimachinery/pkg/api/resource"
30
32
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
31
33
32
- kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
33
- prometheusapiv1 "github.com/prometheus/client_golang/api/prometheus/v1"
34
- prometheusmodel "github.com/prometheus/common/model"
34
+ "github.com/opendatahub-io/distributed-workloads/tests/kfto"
35
35
)
36
36
37
37
func TestMultiGpuPytorchjobAllamBeta13bChatGptq (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -20,16 +20,16 @@ import (
20
20
"fmt"
21
21
"testing"
22
22
23
+ kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
23
24
. "github.com/onsi/gomega"
24
- "github.com/opendatahub-io/distributed-workloads/tests/kfto"
25
25
. "github.com/project-codeflare/codeflare-common/support"
26
- kueuev1beta1 "sigs.k8s.io/kueue/apis/kueue/v1beta1"
27
26
28
27
corev1 "k8s.io/api/core/v1"
29
28
"k8s.io/apimachinery/pkg/api/resource"
30
29
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
30
+ kueuev1beta1 "sigs.k8s.io/kueue/apis/kueue/v1beta1"
31
31
32
- kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1 "
32
+ "github.com/opendatahub-io/distributed-workloads/tests/kfto "
33
33
)
34
34
35
35
func TestPytorchjobWithSFTtrainerFinetuning (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -19,18 +19,18 @@ package fms
19
19
import (
20
20
"testing"
21
21
22
+ kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
22
23
. "github.com/onsi/gomega"
23
- "github.com/opendatahub-io/distributed-workloads/tests/kfto"
24
24
. "github.com/project-codeflare/codeflare-common/support"
25
- kueuev1beta1 "sigs.k8s.io/kueue/apis/kueue/v1beta1"
26
- kueueacv1beta1 "sigs.k8s.io/kueue/client-go/applyconfiguration/kueue/v1beta1"
27
25
28
26
corev1 "k8s.io/api/core/v1"
29
27
"k8s.io/apimachinery/pkg/api/errors"
30
28
"k8s.io/apimachinery/pkg/api/resource"
31
29
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
30
+ kueuev1beta1 "sigs.k8s.io/kueue/apis/kueue/v1beta1"
31
+ kueueacv1beta1 "sigs.k8s.io/kueue/client-go/applyconfiguration/kueue/v1beta1"
32
32
33
- kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1 "
33
+ "github.com/opendatahub-io/distributed-workloads/tests/kfto "
34
34
)
35
35
36
36
var (
Original file line number Diff line number Diff line change @@ -19,14 +19,13 @@ package fms
19
19
import (
20
20
"testing"
21
21
22
+ kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
22
23
. "github.com/onsi/gomega"
23
24
. "github.com/project-codeflare/codeflare-common/support"
24
25
25
26
corev1 "k8s.io/api/core/v1"
26
27
"k8s.io/apimachinery/pkg/api/errors"
27
28
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
28
-
29
- kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
30
29
)
31
30
32
31
var (
Original file line number Diff line number Diff line change @@ -3,14 +3,13 @@ package kfto
3
3
import (
4
4
"testing"
5
5
6
+ kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
6
7
. "github.com/onsi/gomega"
7
8
. "github.com/project-codeflare/codeflare-common/support"
8
9
9
10
corev1 "k8s.io/api/core/v1"
10
11
"k8s.io/apimachinery/pkg/api/resource"
11
12
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
12
-
13
- kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
14
13
)
15
14
16
15
func TestPyTorchJobFailureWithCuda (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -20,14 +20,13 @@ import (
20
20
"fmt"
21
21
"testing"
22
22
23
+ kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
23
24
. "github.com/onsi/gomega"
24
25
. "github.com/project-codeflare/codeflare-common/support"
25
26
26
27
corev1 "k8s.io/api/core/v1"
27
28
"k8s.io/apimachinery/pkg/api/resource"
28
29
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
29
-
30
- kftov1 "github.com/kubeflow/training-operator/pkg/apis/kubeflow.org/v1"
31
30
)
32
31
33
32
func TestPyTorchJobWithCuda (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ import (
25
25
. "github.com/onsi/gomega"
26
26
. "github.com/project-codeflare/codeflare-common/support"
27
27
rayv1 "github.com/ray-project/kuberay/ray-operator/apis/ray/v1"
28
- "sigs.k8s.io/kueue/apis/kueue/v1beta1"
29
28
30
29
corev1 "k8s.io/api/core/v1"
31
30
"k8s.io/apimachinery/pkg/api/resource"
32
31
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
32
+ "sigs.k8s.io/kueue/apis/kueue/v1beta1"
33
33
)
34
34
35
35
func TestMnistRayCpu (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments