Remove Travis (#1868)

This commit is contained in:
Egon Elbre 2019-04-30 21:18:32 +03:00 committed by GitHub
parent 2c9ef5b107
commit ba322abd9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 193 deletions

View File

@ -1,115 +0,0 @@
language: go
go: 1.12.1
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 -vet=off -race -cover -coverprofile=.coverprofile -json -timeout 9m ./... | tparse -all -top -slow 100 -pulse 5s
- 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.16.0
# 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
# install protolock
- go get github.com/nilslice/protolock/cmd/protolock
- 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
- protolock status
- golangci-lint run
- ./scripts/check-dbx-version.sh
- ./scripts/check-travis-tidy.sh
### 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"

View File

@ -81,17 +81,17 @@ install-sim: ## install storj-sim
##@ Test
.PHONY: test
test: ## Run tests on source code (travis)
test: ## Run tests on source code (jenkins)
go test -race -v -cover -coverprofile=.coverprofile ./...
@echo done
.PHONY: test-sim
test-sim: ## Test source with storj-sim (travis)
test-sim: ## Test source with storj-sim (jenkins)
@echo "Running ${@}"
@./scripts/test-sim.sh
.PHONY: test-certificate-signing
test-certificate-signing: ## Test certificate signing service and storagenode setup (travis)
test-certificate-signing: ## Test certificate signing service and storagenode setup (jenkins)
@echo "Running ${@}"
@./scripts/test-certificate-signing.sh

View File

@ -4,7 +4,6 @@
[![Go Doc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/storj.io/storj)
[![Coverage Status](https://img.shields.io/badge/coverage-master-green.svg)](https://build.ops.storj.io/job/storj/job/master/Coverage_20Details/)
![Alpha](https://img.shields.io/badge/version-alpha-green.svg)
[![Build Status](https://travis-ci.com/storj/storj.svg?branch=master)](https://travis-ci.com/storj/storj)
<img src="https://github.com/storj/storj/raw/master/resources/logo.png" width="100">

View File

@ -37,7 +37,7 @@ type config struct {
}
func TestUploadDownload(t *testing.T) {
t.Skip("disable because, keeps stalling Travis intermittently")
t.Skip("disable because, keeps stalling CI intermittently")
ctx := testcontext.New(t)
defer ctx.Cleanup()

View File

@ -1,11 +0,0 @@
#!/bin/bash
CHANGES=$(git diff --name-only $TRAVIS_COMMIT_RANGE -- go.mod go.sum) || CHANGES="fail"
if [ -z "$CHANGES" ]
then
echo "go modules not changed"
else
echo "go module changes detected: $CHANGES"
gospace istidy
fi

View File

@ -1,28 +0,0 @@
$xhome = $env:USERPROFILE
Set-Location $xhome
New-Item "$xhome/bin" -Force -ItemType "directory"
New-Item "$xhome/cache" -Force -ItemType "directory"
$env:PATH=$env:PATH + ";$xhome/bin"
$env:GOSPACE_ROOT="$env:GOPATH"
$env:GOSPACE_PKG="storj.io/storj"
$env:GOSPACE_REPO="git@github.com:storj/storj.git"
# setup gospace
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
Invoke-WebRequest -Uri "https://github.com/storj/gospace/releases/download/v0.0.5/gospace_windows_amd64.exe" -OutFile "$xhome/bin/gospace.exe"
# find module dependency hash
$modhash = gospace hash
# download dependencies, if we don't have them in cache
if (!(Test-Path $xhome/cache/$modhash.zip)) {
gospace zip-vendor $xhome/cache/$modhash.zip
}
# unpack the dependencies into gopath
gospace unzip-vendor $xhome/cache/$modhash.zip
gospace flatten-vendor

View File

@ -1,34 +0,0 @@
set -x
mkdir -p ~/bin ~/cache
export PATH=~/bin:$PATH
if [[ "${GO111MODULE}" == on ]]; then
export GO111MODULE=auto
mkdir -p $GOPATH/src/storj.io/storj
cp -a -r ${TRAVIS_BUILD_DIR}/. $GOPATH/src/storj.io/storj/
export TRAVIS_BUILD_DIR=$GOPATH/src/storj.io/storj
cd ${TRAVIS_BUILD_DIR}
fi
export GOSPACE_ROOT=$GOPATH
export GOSPACE_PKG=storj.io/storj
export GOSPACE_REPO=git@github.com:storj/storj/git
# setup gospace
wget -O ~/bin/gospace https://github.com/storj/gospace/releases/download/v0.0.5/gospace_linux_amd64
chmod +x ~/bin/gospace
# find module dependency hash
MODHASH=$(gospace hash)
# download dependencies, if we don't have them in cache
if [ ! -f $HOME/cache/$MODHASH.zip ]; then
gospace zip-vendor $HOME/cache/$MODHASH.zip
fi
# unpack the dependencies into gopath
gospace unzip-vendor $HOME/cache/$MODHASH.zip
gospace flatten-vendor
set +x