storj/.travis.yml
paul cannon e2c0dd437a
offer PostgreSQL storage for pointerdb (#440)
..although it ought to work for other storage.KeyValueStore needs as
well. it's just optimized to work pretty well for a largish hierarchy of
paths.

This includes the addition of "long benchmarks" for KeyValueStore
testing. These will only be run when -test-bench-long is added to the
test flags. In these benchmarks, a large corpus of paths matching a
natural ("real-life") hierarchy is read from paths.data.gz (which you
can get from https://github.com/storj/path-test-corpus) and imported
into a particular KeyValueStore. Recursive and non-recursive queries are
run on it to detect performance problems that arise only at scale.

This also includes alternate implementation of the postgreskv client,
which works in a less-bizarre way for non-recursive queries, but suffers
from poor performance in tests such as the long benchmarks. Once this
alternate impl is committed to the tree, we can remove it again; I just
want it to be available for future reference.
2018-10-25 12:11:28 -05:00

80 lines
2.1 KiB
YAML

language: go
go: 1.11.x
go_import_path: "storj.io/storj"
git:
depth: 1
cache:
directories:
- /home/travis/cache
services:
- redis
- postgresql
before_script:
# Add an IPv6 config - see the corresponding Travis issue
# https://github.com/travis-ci/travis-ci/issues/8361
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6';
sudo sh -c 'echo "\n::1 localhost\n" >> /etc/hosts';
psql -c 'create database pointerdb' -U postgres;
fi;
before_install:
- source scripts/setup-gopath.sh
matrix:
allow_failures:
- os: windows # allow failures on windows because it's slow
include:
### tests ###
- env:
- MODE=tests
- STORJ_POSTGRESKV_TEST=postgres://postgres@localhost/pointerdb?sslmode=disable
install:
- pushd ~
- GOBIN=${GOPATH}/bin GOPATH=~/gotools go get github.com/mattn/goveralls
- popd
- go install -race ./...
script:
- go test -race -cover -coverprofile=.coverprofile ./...
- goveralls -coverprofile=.coverprofile -service=travis-ci
### run linters ###
- env: MODE=lint
install:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ${GOPATH}/bin v1.10.2
script:
- ./scripts/check-for-header.sh
- golangci-lint run
### captplanet tests ###
- env: MODE=integration
install:
- source scripts/install-awscli.sh
- go install storj.io/storj/cmd/captplanet
script:
- make test-captplanet
### windows tests ###
- env: MODE=windows-tests
os: windows
cache:
directories:
- "%HOME%/cache"
before_install:
- powershell -executionpolicy bypass -File scripts/setup-gopath.ps1
install:
- go get github.com/mattn/goveralls
- go install -race ./...
script:
- go test -race -cover -coverprofile=.coverprofile ./...
- goveralls -coverprofile=.coverprofile -service=travis-ci
fast_finish: true
addons:
postgresql: "9.5"