1 Star 0 Fork 0

NATS/nats-streaming-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.travis.yml 2.01 KB
一键复制 编辑 原始数据 按行查看 历史
os:
- linux
- windows
vm:
size: 2x-large
language: go
go:
- "1.21.4"
- "1.20.11"
addons:
apt:
packages:
- rpm
env:
- GO111MODULE=on
go_import_path: github.com/nats-io/nats-streaming-server
install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$TRAVIS_GO_VERSION" =~ 1.20 ]]; then
go install honnef.co/go/tools/cmd/staticcheck@latest;
go install github.com/client9/misspell/cmd/misspell@latest;
fi;
fi
services:
- mysql
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
GO_LIST=$(go list ./... | grep -v "/spb");
go install;
$(exit $(go fmt $GO_LIST | wc -l));
go vet $GO_LIST;
if [[ "$TRAVIS_GO_VERSION" =~ 1.20 ]]; then
find . -type f -name "*.go" | grep -v "/spb/" | xargs misspell -error -locale US;
staticcheck $GO_LIST;
fi;
fi
script:
- set -e
- if [[ $TRAVIS_TAG ]]; then go test -v -run=TestVersionMatchesTag ./server -sql=false; fi
- if [[ ! $TRAVIS_TAG ]]; then
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mysql -u root -e "CREATE USER 'nss'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON *.* TO 'nss'@'localhost'; CREATE DATABASE test_nats_streaming;";
if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then
./scripts/cov.sh TRAVIS;
else
go test -v -p=1 ./... -count=1 -vet=off -failfast;
fi;
fi;
fi
- if [[ ! $TRAVIS_TAG ]]; then
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then
go build;
else
go install;
go test -v -p=1 ./... -count=1 -vet=off -sql=false -failfast;
fi;
fi;
fi
- set +e
after_success:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ ! $TRAVIS_TAG ]]; then if [[ "$TRAVIS_GO_VERSION" =~ 1.21 ]]; then $HOME/gopath/bin/goveralls -coverprofile=acc.out -service travis-ci; fi; fi;
fi
deploy:
provider: script
cleanup: true
script: curl -sL http://git.io/goreleaser | bash
on:
tags: true
condition: ("$TRAVIS_OS_NAME" = "linux") && ("$TRAVIS_GO_VERSION" =~ "1.20")
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/nats-io/nats-streaming-server.git
git@gitee.com:nats-io/nats-streaming-server.git
nats-io
nats-streaming-server
nats-streaming-server
main

搜索帮助

D67c1975 1850385 1daf7b77 1850385