mirror of
https://github.com/distribution/distribution
synced 2024-11-12 05:45:51 +01:00
84 lines
2.2 KiB
YAML
84 lines
2.2 KiB
YAML
machine:
|
|
pre:
|
|
- bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/1.0.22/binscripts/gvm-installer)
|
|
|
|
post:
|
|
- gvm install go1.3.3 -B --name=old
|
|
- gvm install go1.4 -B --name=stable
|
|
|
|
environment:
|
|
CHECKOUT: /home/ubuntu/$CIRCLE_PROJECT_REPONAME
|
|
BASE_DIR: src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME
|
|
BASE_OLD: ../../../$HOME/.gvm/pkgsets/old/global/$BASE_DIR
|
|
BASE_STABLE: ../../../$HOME/.gvm/pkgsets/stable/global/$BASE_DIR
|
|
CIRCLE_PAIN: "mode: set"
|
|
|
|
hosts:
|
|
fancy: 127.0.0.1
|
|
|
|
dependencies:
|
|
pre:
|
|
- >
|
|
gvm use old &&
|
|
mkdir -p "$(dirname $BASE_OLD)" &&
|
|
cp -R "$CHECKOUT" "$BASE_OLD"
|
|
|
|
- >
|
|
gvm use stable &&
|
|
mkdir -p "$(dirname $BASE_STABLE)" &&
|
|
cp -R "$CHECKOUT" "$BASE_STABLE"
|
|
|
|
override:
|
|
- gvm use old && go get -t -d -v ./...:
|
|
pwd: $BASE_OLD
|
|
|
|
- gvm use stable && go get -t -d -v ./...:
|
|
pwd: $BASE_STABLE
|
|
|
|
post:
|
|
- >
|
|
gvm use stable &&
|
|
go get github.com/axw/gocov/gocov github.com/mattn/goveralls github.com/golang/lint/golint
|
|
|
|
test:
|
|
pre:
|
|
- gvm use old && go version
|
|
- gvm use stable && go version
|
|
|
|
- gvm use stable && test -z "$(gofmt -s -l . | tee /dev/stderr)":
|
|
pwd: $BASE_STABLE
|
|
|
|
- gvm use stable && go vet ./...:
|
|
pwd: $BASE_STABLE
|
|
|
|
- gvm use stable && test -z "$(golint ./... | tee /dev/stderr)":
|
|
pwd: $BASE_STABLE
|
|
|
|
override:
|
|
- gvm use old; go test -test.v -test.short ./...:
|
|
timeout: 600
|
|
pwd: $BASE_OLD
|
|
|
|
- echo "$CIRCLE_PAIN" > ~/goverage.report
|
|
- gvm use stable; go list ./... | xargs -L 1 -I{} rm -f $GOPATH/src/{}/coverage.out:
|
|
pwd: $BASE_STABLE
|
|
|
|
- gvm use stable; go list ./... | xargs -L 1 -I{} go test -test.short -coverprofile=$GOPATH/src/{}/coverage.out {}:
|
|
timeout: 600
|
|
pwd: $BASE_STABLE
|
|
|
|
post:
|
|
- gvm use stable; go list ./... | xargs -L 1 -I{} cat "$GOPATH/src/{}/coverage.out" | grep -v "$CIRCLE_PAIN" >> ~/goverage.report:
|
|
pwd: $BASE_STABLE
|
|
- gvm use stable; goveralls -service circleci -coverprofile=/home/ubuntu/goverage.report -repotoken $COVERALLS_TOKEN:
|
|
pwd: $BASE_STABLE
|
|
|
|
general:
|
|
branches:
|
|
ignore:
|
|
- master
|
|
- 0.7
|
|
- 0.8
|
|
- 0.9
|
|
- 1.0
|