github.com/npaton/distribution@v2.3.1-rc.0+incompatible/circle.yml (about) 1 # Pony-up! 2 machine: 3 pre: 4 # Install gvm 5 - bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/1.0.22/binscripts/gvm-installer) 6 # Install ceph to test rados driver & create pool 7 - sudo -i ~/distribution/contrib/ceph/ci-setup.sh 8 - ceph osd pool create docker-distribution 1 9 # Install codecov for coverage 10 - pip install --user codecov 11 12 post: 13 # go 14 - gvm install go1.5.3 --prefer-binary --name=stable 15 16 environment: 17 # Convenient shortcuts to "common" locations 18 CHECKOUT: /home/ubuntu/$CIRCLE_PROJECT_REPONAME 19 BASE_DIR: src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME 20 # Trick circle brainflat "no absolute path" behavior 21 BASE_STABLE: ../../../$HOME/.gvm/pkgsets/stable/global/$BASE_DIR 22 DOCKER_BUILDTAGS: "include_rados include_oss include_gcs" 23 # Workaround Circle parsing dumb bugs and/or YAML wonkyness 24 CIRCLE_PAIN: "mode: set" 25 # Ceph config 26 RADOS_POOL: "docker-distribution" 27 28 hosts: 29 # Not used yet 30 fancy: 127.0.0.1 31 32 dependencies: 33 pre: 34 # Copy the code to the gopath of all go versions 35 - > 36 gvm use stable && 37 mkdir -p "$(dirname $BASE_STABLE)" && 38 cp -R "$CHECKOUT" "$BASE_STABLE" 39 40 override: 41 # Install dependencies for every copied clone/go version 42 - gvm use stable && go get github.com/tools/godep: 43 pwd: $BASE_STABLE 44 45 post: 46 # For the stable go version, additionally install linting tools 47 - > 48 gvm use stable && 49 go get github.com/axw/gocov/gocov github.com/golang/lint/golint 50 51 test: 52 pre: 53 # Output the go versions we are going to test 54 # - gvm use old && go version 55 - gvm use stable && go version 56 57 # First thing: build everything. This will catch compile errors, and it's 58 # also necessary for go vet to work properly (see #807). 59 - gvm use stable && godep go install ./...: 60 pwd: $BASE_STABLE 61 62 # FMT 63 - gvm use stable && test -z "$(gofmt -s -l . | grep -v Godeps/_workspace/src/ | tee /dev/stderr)": 64 pwd: $BASE_STABLE 65 66 # VET 67 - gvm use stable && go vet ./...: 68 pwd: $BASE_STABLE 69 70 # LINT 71 - gvm use stable && test -z "$(golint ./... | grep -v Godeps/_workspace/src/ | tee /dev/stderr)": 72 pwd: $BASE_STABLE 73 74 override: 75 # Test stable, and report 76 - gvm use stable; export ROOT_PACKAGE=$(go list .); go list -tags "$DOCKER_BUILDTAGS" ./... | xargs -L 1 -I{} bash -c 'export PACKAGE={}; godep go test -tags "$DOCKER_BUILDTAGS" -test.short -coverprofile=$GOPATH/src/$PACKAGE/coverage.out -coverpkg=$(./coverpkg.sh $PACKAGE $ROOT_PACKAGE) $PACKAGE': 77 timeout: 600 78 pwd: $BASE_STABLE 79 80 post: 81 # Report to codecov 82 - bash <(curl -s https://codecov.io/bash): 83 pwd: $BASE_STABLE 84 85 ## Notes 86 # Disabled the -race detector due to massive memory usage. 87 # Do we want these as well? 88 # - go get code.google.com/p/go.tools/cmd/goimports 89 # - test -z "$(goimports -l -w ./... | tee /dev/stderr)" 90 # http://labix.org/gocheck