storj/.travis.yml
Egon Elbre bbf81f2479 Consolidate identity management to identity cli commands (#1083)
* Consolidate identity management:

Move identity cretaion/signing out of storagenode setup command.

* fixes

* linters

* Consolidate identity management:

Move identity cretaion/signing out of storagenode setup command.

* fixes

* sava backups before saving signed certs

* add "-prebuilt-test-cmds" test flag

* linters

* prepare cli tests for travis

* linter fixes

* more fixes

* linter gods

* sp/sdk/sim

* remove ca.difficulty

* remove unused difficulty

* return setup to its rightful place

* wip travis

* Revert "wip travis"

This reverts commit 56834849dcf066d3cc0a4f139033fc3f6d7188ca.

* typo in travis.yaml

* remove tests

* remove more

* make it only create one identity at a time for consistency

* add config-dir for consitency

* add identity creation to storj-sim

* add flags

* simplify

* fix nolint and compile

* prevent overwrite and pass difficulty, concurrency, and parent creds

* goimports
2019-01-18 11:36:58 +01:00

112 lines
3.4 KiB
YAML

language: go
go: 1.11.x
go_import_path: "storj.io/storj"
git:
depth: 1
cache:
directories:
- /home/travis/cache
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 teststorj' -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_POSTGRES_TEST=postgres://postgres@localhost/teststorj?sslmode=disable
services:
- redis
- postgresql
install:
- pushd ~
- GOBIN=${GOPATH}/bin GOPATH=~/gotools go get github.com/mattn/goveralls
- GOBIN=${GOPATH}/bin GOPATH=~/gotools go get github.com/mfridman/tparse
- popd
- go install -race ./...
script:
- go run scripts/use-ports.go -from 1024 -to 10000 &
- go test -race -cover -coverprofile=.coverprofile -json -timeout 9m ./... | tparse -all
- goveralls -coverprofile=.coverprofile -service=travis-ci
- rm .coverprofile
- go run scripts/check-clean-directory.go
### run linters ###
- env: MODE=lint
install:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b ${GOPATH}/bin v1.12.2
# install protoc
- curl -L https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip -o /tmp/protoc.zip
- unzip /tmp/protoc.zip -d "$HOME"/protoc
# install proto linter
- cp go.mod go.mod.backup
- go get github.com/ckaznocha/protoc-gen-lint
- go get golang.org/x/tools/go/packages
- cp go.mod.backup go.mod
script:
- go run ./scripts/check-copyright.go
# - go run ./scripts/check-imports.go ./...
- go run ./scripts/protobuf.go --protoc=$HOME/protoc/bin/protoc lint
- golangci-lint run
# - gospace istidy
### integration tests ###
- env: MODE=integration
services:
- redis
install:
- source scripts/install-awscli.sh
- make install-sim
script:
- set -o pipefail && make test-sim |& go run scripts/fail-on-race.go
- set -o pipefail && make test-certificate-signing |& go run scripts/fail-on-race.go
### Docker tests ###
- env: MODE=docker
if: commit_message =~ /(?i:docker)/
services:
- docker
before_install:
- echo "skip"
install:
- source scripts/install-awscli.sh
script:
- set -o pipefail && make test-all-in-one |& go run scripts/fail-on-race.go
### windows tests ###
- env: MODE=windows-tests
if: commit_message =~ /(?i:windows)/
os: windows
services:
- redis
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"