ipld-eth-server/vendor/gopkg.in/DataDog/dd-trace-go.v1/.circleci/config.yml
Rob Mulholand 560305f601 Update dependencies
- uses newer version of go-ethereum required for go1.11
2018-09-13 16:14:35 -05:00

136 lines
4.3 KiB
YAML

version: 2
jobs:
build:
working_directory: /go/src/gopkg.in/DataDog/dd-trace-go.v1
resource_class: xlarge
docker:
- image: circleci/golang:latest
- image: cassandra:3.7
- image: circleci/mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: admin
MYSQL_PASSWORD: test
MYSQL_USER: test
MYSQL_DATABASE: test
- image: circleci/postgres:9.5
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: postgres
- image: redis:3.2
- image: elasticsearch:2
environment:
ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
- image: elasticsearch:5
environment:
ES_JAVA_OPTS: "-Xms750m -Xmx750m" # https://github.com/10up/wp-local-docker/issues/6
- image: datadog/docker-dd-agent
environment:
DD_APM_ENABLED: "true"
DD_BIND_HOST: "0.0.0.0"
DD_API_KEY: invalid_key_but_this_is_fine
- image: circleci/mongo:latest-ram
- image: memcached:1.5.9
- image: confluentinc/cp-zookeeper:5.0.0
environment:
ZOOKEEPER_CLIENT_PORT: "2181"
- image: confluentinc/cp-kafka:5.0.0
environment:
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_CREATE_TOPICS: gotest:1:1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
steps:
- checkout
- restore_cache:
keys:
- v1-librdkafka-v0.11.5
- run:
name: Install rdkafka
command: |
if [ ! -d /tmp/librdkafka-v0.11.5 ] ; then
echo "building librdkafka"
git clone --branch v0.11.5 https://github.com/edenhill/librdkafka.git /tmp/librdkafka-v0.11.5
(cd /tmp/librdkafka-v0.11.5 && ./configure && make)
fi
echo "installing librdkafka"
(cd /tmp/librdkafka-v0.11.5 && sudo make install)
sudo ldconfig
- save_cache:
key: v1-librdkafka-v0.11.5
paths:
- /tmp/librdkafka-v0.11.5
- run:
name: Vendor gRPC v1.2.0
# This step vendors gRPC v1.2.0 inside our gRPC.v12 contrib
# to allow running the tests against the correct version of
# the gRPC library. The library is not committed into the
# repository to avoid conflicts with the user's imports.
environment:
GRPC_DEST: contrib/google.golang.org/grpc.v12/vendor/google.golang.org/grpc
command: |
mkdir -p $GRPC_DEST
git clone --branch v1.2.0 https://github.com/grpc/grpc-go $GRPC_DEST
- run:
name: Fetching dependencies
command: |
go get -v -t ./...
go get -v -u golang.org/x/lint/golint
go get -v -u github.com/alecthomas/gometalinter
- run:
name: Wait for MySQL
command: dockerize -wait tcp://localhost:3306 -timeout 1m
- run:
name: Wait for Postgres
command: dockerize -wait tcp://localhost:5432 -timeout 1m
- run:
name: Wait for Redis
command: dockerize -wait tcp://localhost:6379 -timeout 1m
- run:
name: Wait for ElasticSearch (1)
command: dockerize -wait http://localhost:9200 -timeout 1m
- run:
name: Wait for ElasticSearch (2)
command: dockerize -wait http://localhost:9201 -timeout 1m
- run:
name: Wait for Datadog Agent
command: dockerize -wait tcp://127.0.0.1:8126 -timeout 1m
- run:
name: Wait for Cassandra
command: dockerize -wait tcp://localhost:9042 -timeout 2m
- run:
name: Linting
command: |
gometalinter --disable-all --vendor --deadline=60s \
--enable=golint \
--enable=vet \
./...
- run:
name: Testing
command: |
INTEGRATION=1 go test -v -race `go list ./... | grep -v contrib/go-redis/redis`
- run:
name: Testing contrib/go-redis/redis
command: |
(cd $GOPATH/src/github.com/go-redis/redis && git checkout v6.13.2)
INTEGRATION=1 go test -v -race ./contrib/go-redis/redis/...
(cd $GOPATH/src/github.com/go-redis/redis && git checkout master)
INTEGRATION=1 go test -v -race ./contrib/go-redis/redis/...