fluid/.travis.yml

28 lines
1.4 KiB
YAML

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)