File tree Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : KFP Backend Tests
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+ branches :
9
+ - master
10
+ paths :
11
+ - ' backend/**'
12
+ - ' test/presubmit-backend-test.sh'
13
+ workflow_dispatch :
14
+
15
+ jobs :
16
+ backend-tests :
17
+ runs-on : ubuntu-latest
18
+
19
+ steps :
20
+ - name : Checkout code
21
+ uses : actions/checkout@v2
22
+
23
+ - name : Set up Go
24
+ uses : actions/setup-go@v3
25
+ with :
26
+ go-version : ' 1.21'
27
+
28
+ - name : Run Backend Tests
29
+ run : ./test/presubmit-backend-test.sh
Original file line number Diff line number Diff line change @@ -19,16 +19,16 @@ set -ex
19
19
20
20
# Add installed go binaries to PATH.
21
21
export PATH=" ${PATH} :$( go env GOPATH) /bin"
22
- # The current directory is /home/prow/go/src/github.com/kubeflow/pipelines
23
- cd /home/prow/go/src/github.com/kubeflow/pipelines
22
+
24
23
# 1. Check go modules are tidy
25
24
# Reference: https://github.com/golang/go/issues/27005#issuecomment-564892876
26
25
go mod download
27
26
go mod tidy
28
27
git diff --exit-code -- go.mod go.sum || (echo " go modules are not tidy, run 'go mod tidy'." && exit 1)
29
- # 2. run test in project directory
28
+
29
+ # 2. Run tests in the backend directory
30
30
go test -v -cover ./backend/...
31
+
31
32
# 3. Check for forbidden go licenses
32
33
./hack/install-go-licenses.sh
33
34
go-licenses check ./backend/src/apiserver ./backend/src/cache ./backend/src/agent/persistence ./backend/src/crd/controller/scheduledworkflow ./backend/src/crd/controller/viewer
34
-
You can’t perform that action at this time.
0 commit comments