generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 961
/
.travis.yml
27 lines (27 loc) · 1.36 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
matrix:
include:
- language: go
go:
- "1.21.10"
os:
- linux
go_import_path: github.com/fluid-cloudnative/fluid
#for the convenience of gohook to set gcflag here
env:
- CI_TEST_FLAGS='-race -coverprofile=coverage.txt -covermode=atomic'
sudo: true
before_script:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0
- arch=$(go env GOARCH)
- curl -L https://go.kubebuilder.io/dl/2.3.1/linux/${arch} | tar -xz -C /tmp/
- sudo mv /tmp/kubebuilder_2.3.1_linux_${arch} /usr/local/kubebuilder
- export PATH=$PATH:/usr/local/kubebuilder/bin
script:
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=off go build -o bin/dataset-controller cmd/dataset/main.go
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=off go build -o bin/alluxioruntime-controller cmd/alluxio/main.go
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=off go build -o bin/csi cmd/csi/main.go
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=off go vet ./...
- golangci-lint run --timeout=10m ./...
- test -z "$(go fmt ./... 2>/dev/null | tee /dev/stderr)" || (echo "please format Go code with 'gofmt'")
- make test
- bash <(curl -s https://codecov.io/bash)