etcd/.travis.yml

138 lines
5.1 KiB
YAML
Raw Normal View History

2014-09-10 02:44:41 +04:00
language: go
go_import_path: go.etcd.io/etcd/v3
sudo: required
services: docker
2014-09-10 02:44:41 +04:00
go:
- 1.14.3
- tip
2014-09-10 02:44:41 +04:00
notifications:
on_success: never
on_failure: never
env:
matrix:
- TARGET=linux-amd64-fmt
- TARGET=linux-amd64-integration-1-cpu
- TARGET=linux-amd64-integration-2-cpu
- TARGET=linux-amd64-integration-4-cpu
- TARGET=linux-amd64-functional
- TARGET=linux-amd64-unit-4-cpu-race
- TARGET=all-build
- TARGET=linux-amd64-grpcproxy
- TARGET=linux-amd64-coverage
- TARGET=linux-amd64-fmt-unit-go-tip-2-cpu
- TARGET=linux-386-unit-1-cpu
matrix:
fast_finish: true
allow_failures:
- go: 1.14.3
env: TARGET=linux-amd64-grpcproxy
- go: 1.14.3
env: TARGET=linux-amd64-coverage
- go: tip
env: TARGET=linux-amd64-fmt-unit-go-tip-2-cpu
- go: 1.14.3
env: TARGET=linux-386-unit-1-cpu
exclude:
- go: tip
env: TARGET=linux-amd64-fmt
- go: tip
env: TARGET=linux-amd64-integration-1-cpu
- go: tip
env: TARGET=linux-amd64-integration-2-cpu
- go: tip
env: TARGET=linux-amd64-integration-4-cpu
- go: tip
env: TARGET=linux-amd64-functional
- go: tip
env: TARGET=linux-amd64-unit-4-cpu-race
- go: tip
env: TARGET=all-build
- go: tip
env: TARGET=linux-amd64-grpcproxy
- go: tip
env: TARGET=linux-amd64-coverage
- go: 1.14.3
env: TARGET=linux-amd64-fmt-unit-go-tip-2-cpu
- go: tip
env: TARGET=linux-386-unit-1-cpu
before_install:
- if [[ $TRAVIS_GO_VERSION == 1.* ]]; then docker pull gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION}; fi
2015-11-02 05:06:49 +03:00
install:
- go get -t -v -d ./...
- (cd tests && go get -t -v -d ./...)
- (cd pkg && go get -t -v -d ./...)
2016-03-23 03:31:25 +03:00
2014-09-10 02:44:41 +04:00
script:
- echo "TRAVIS_GO_VERSION=${TRAVIS_GO_VERSION}"
- >
2016-07-14 06:11:29 +03:00
case "${TARGET}" in
linux-amd64-fmt)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 PASSES='fmt bom dep' ./test"
;;
linux-amd64-integration-1-cpu)
# TODO: Reenable 'race' when https://github.com/etcd-io/etcd/issues/12336 fixed.
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 CPU=1 PASSES='integration' RACE='false' ./test"
;;
linux-amd64-integration-2-cpu)
# TODO: Reenable 'race' when https://github.com/etcd-io/etcd/issues/12336 fixed.
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 CPU=2 PASSES='integration' RACE='false' ./test"
;;
linux-amd64-integration-4-cpu)
# TODO: Reenable 'race' when https://github.com/etcd-io/etcd/issues/12336 fixed.
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 CPU=4 PASSES='integration' RACE='false' ./test"
;;
linux-amd64-functional)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
./test: Add PASSES="mod_tidy" check Added check that ensures that go.mod & go.sum files are up-to-date. The check verifies whether 'go mod tidy' does not generate any mutations in these files. The check can be run on its own: PASSES="mod_tidy" ./test Or as part of "fmt" pass: PASSES="fmt" ./test Examplar outputs: ``` % PASSES="fmt" ./test Running with TEST_CPUS: 1,2,4 Starting 'fmt' pass at Fri 11 Sep 2020 11:07:54 PM CEST 'shellcheck' started at Fri 11 Sep 2020 11:07:54 PM CEST 'shellcheck' completed at Fri 11 Sep 2020 11:07:54 PM CEST 'markdown_you' started at Fri 11 Sep 2020 11:07:54 PM CEST 'markdown_you' completed at Fri 11 Sep 2020 11:07:54 PM CEST 'goword' started at Fri 11 Sep 2020 11:07:54 PM CEST 'goword' completed at Fri 11 Sep 2020 11:07:54 PM CEST 'gofmt' started at Fri 11 Sep 2020 11:07:54 PM CEST 'gofmt' completed at Fri 11 Sep 2020 11:07:55 PM CEST 'govet' started at Fri 11 Sep 2020 11:07:55 PM CEST 'govet' completed at Fri 11 Sep 2020 11:07:57 PM CEST 'revive' started at Fri 11 Sep 2020 11:07:57 PM CEST Skipping revive... 'revive' completed at Fri 11 Sep 2020 11:07:57 PM CEST 'license_header' started at Fri 11 Sep 2020 11:07:57 PM CEST 'license_header' completed at Fri 11 Sep 2020 11:07:58 PM CEST 'receiver_name' started at Fri 11 Sep 2020 11:07:58 PM CEST 'receiver_name' completed at Fri 11 Sep 2020 11:07:58 PM CEST 'commit_title' started at Fri 11 Sep 2020 11:07:58 PM CEST 'commit_title' completed at Fri 11 Sep 2020 11:07:58 PM CEST 'mod_tidy' started at Fri 11 Sep 2020 11:07:58 PM CEST *** /tmp/fileiALKRA_go.mod 2020-09-11 23:07:58.838010716 +0200 --- ./go.mod 2020-09-11 23:07:58.974010922 +0200 *************** *** 29,39 **** github.com/mattn/go-runewidth v0.0.2 // indirect github.com/modern-go/reflect2 v1.0.1 github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 github.com/prometheus/client_golang v1.0.0 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 - github.com/prometheus/common v0.4.1 github.com/sirupsen/logrus v1.4.2 // indirect github.com/soheilhy/cmux v0.1.4 github.com/spf13/cobra v0.0.3 github.com/spf13/pflag v1.0.1 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 --- 29,38 ---- ./go.mod is not in sync with 'go mod tidy' ``` ``` % PASSES="mod_tidy" ./test Running with TEST_CPUS: 1,2,4 Starting 'mod_tidy' pass at Fri 11 Sep 2020 11:09:21 PM CEST *** /tmp/file9gy4so_go.mod 2020-09-11 23:09:21.166133290 +0200 --- ./go.mod 2020-09-11 23:09:21.286133466 +0200 *************** *** 29,39 **** github.com/mattn/go-runewidth v0.0.2 // indirect github.com/modern-go/reflect2 v1.0.1 github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 github.com/prometheus/client_golang v1.0.0 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 - github.com/prometheus/common v0.4.1 github.com/sirupsen/logrus v1.4.2 // indirect github.com/soheilhy/cmux v0.1.4 github.com/spf13/cobra v0.0.3 github.com/spf13/pflag v1.0.1 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 --- 29,38 ---- ./go.mod is not in sync with 'go mod tidy' ```
2020-09-12 00:10:47 +03:00
/bin/bash -c "GO_BUILD_FLAGS='-v -mod=readonly' ./build && GOARCH=amd64 PASSES='functional' ./test"
;;
linux-amd64-unit-4-cpu-race)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 PASSES='unit' RACE='true' CPU='4' ./test -p=2"
;;
all-build)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=amd64 PASSES='build' ./test \
&& GOARCH=386 PASSES='build' ./test \
./test: Add PASSES="mod_tidy" check Added check that ensures that go.mod & go.sum files are up-to-date. The check verifies whether 'go mod tidy' does not generate any mutations in these files. The check can be run on its own: PASSES="mod_tidy" ./test Or as part of "fmt" pass: PASSES="fmt" ./test Examplar outputs: ``` % PASSES="fmt" ./test Running with TEST_CPUS: 1,2,4 Starting 'fmt' pass at Fri 11 Sep 2020 11:07:54 PM CEST 'shellcheck' started at Fri 11 Sep 2020 11:07:54 PM CEST 'shellcheck' completed at Fri 11 Sep 2020 11:07:54 PM CEST 'markdown_you' started at Fri 11 Sep 2020 11:07:54 PM CEST 'markdown_you' completed at Fri 11 Sep 2020 11:07:54 PM CEST 'goword' started at Fri 11 Sep 2020 11:07:54 PM CEST 'goword' completed at Fri 11 Sep 2020 11:07:54 PM CEST 'gofmt' started at Fri 11 Sep 2020 11:07:54 PM CEST 'gofmt' completed at Fri 11 Sep 2020 11:07:55 PM CEST 'govet' started at Fri 11 Sep 2020 11:07:55 PM CEST 'govet' completed at Fri 11 Sep 2020 11:07:57 PM CEST 'revive' started at Fri 11 Sep 2020 11:07:57 PM CEST Skipping revive... 'revive' completed at Fri 11 Sep 2020 11:07:57 PM CEST 'license_header' started at Fri 11 Sep 2020 11:07:57 PM CEST 'license_header' completed at Fri 11 Sep 2020 11:07:58 PM CEST 'receiver_name' started at Fri 11 Sep 2020 11:07:58 PM CEST 'receiver_name' completed at Fri 11 Sep 2020 11:07:58 PM CEST 'commit_title' started at Fri 11 Sep 2020 11:07:58 PM CEST 'commit_title' completed at Fri 11 Sep 2020 11:07:58 PM CEST 'mod_tidy' started at Fri 11 Sep 2020 11:07:58 PM CEST *** /tmp/fileiALKRA_go.mod 2020-09-11 23:07:58.838010716 +0200 --- ./go.mod 2020-09-11 23:07:58.974010922 +0200 *************** *** 29,39 **** github.com/mattn/go-runewidth v0.0.2 // indirect github.com/modern-go/reflect2 v1.0.1 github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 github.com/prometheus/client_golang v1.0.0 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 - github.com/prometheus/common v0.4.1 github.com/sirupsen/logrus v1.4.2 // indirect github.com/soheilhy/cmux v0.1.4 github.com/spf13/cobra v0.0.3 github.com/spf13/pflag v1.0.1 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 --- 29,38 ---- ./go.mod is not in sync with 'go mod tidy' ``` ``` % PASSES="mod_tidy" ./test Running with TEST_CPUS: 1,2,4 Starting 'mod_tidy' pass at Fri 11 Sep 2020 11:09:21 PM CEST *** /tmp/file9gy4so_go.mod 2020-09-11 23:09:21.166133290 +0200 --- ./go.mod 2020-09-11 23:09:21.286133466 +0200 *************** *** 29,39 **** github.com/mattn/go-runewidth v0.0.2 // indirect github.com/modern-go/reflect2 v1.0.1 github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5 github.com/prometheus/client_golang v1.0.0 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 - github.com/prometheus/common v0.4.1 github.com/sirupsen/logrus v1.4.2 // indirect github.com/soheilhy/cmux v0.1.4 github.com/spf13/cobra v0.0.3 github.com/spf13/pflag v1.0.1 github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 --- 29,38 ---- ./go.mod is not in sync with 'go mod tidy' ```
2020-09-12 00:10:47 +03:00
&& GO_BUILD_FLAGS='-v -mod=readonly' GOOS=darwin GOARCH=amd64 ./build \
&& GO_BUILD_FLAGS='-v -mod=readonly' GOOS=windows GOARCH=amd64 ./build \
&& GO_BUILD_FLAGS='-v -mod=readonly' GOARCH=arm ./build \
&& GO_BUILD_FLAGS='-v -mod=readonly' GOARCH=arm64 ./build \
&& GO_BUILD_FLAGS='-v -mod=readonly' GOARCH=ppc64le ./build \
&& GO_BUILD_FLAGS='-v -mod=readonly' GOARCH=s390x ./build"
2016-07-14 06:11:29 +03:00
;;
linux-amd64-grpcproxy)
# TODO: Reenable race when https://github.com/etcd-io/etcd/issues/12336 fixed.
sudo HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build grpcproxy' VERBOSE='1' CPU='4' COVER='false' RACE='false'" make docker-test
;;
linux-amd64-coverage)
sudo HOST_TMP_DIR=/tmp TEST_OPTS="VERBOSE='1'" make docker-test-coverage
;;
linux-amd64-fmt-unit-go-tip-2-cpu)
GOARCH=amd64 PASSES='fmt unit' CPU='2' RACE='false' ./test -p=2
;;
linux-386-unit-1-cpu)
docker run --rm \
--volume=`pwd`:/go/src/go.etcd.io/etcd gcr.io/etcd-development/etcd-test:go${TRAVIS_GO_VERSION} \
/bin/bash -c "GOARCH=386 PASSES='unit' RACE='false' CPU='1' ./test -p=4"
;;
2016-07-14 06:11:29 +03:00
esac