diff --git a/circle.yml b/circle.yml index 54f2f57..26a789d 100644 --- a/circle.yml +++ b/circle.yml @@ -1,32 +1,23 @@ -machine: - environment: - CC: gcc - CXX: g++ - GOPATH: /home/ubuntu/.go_workspace - GOVER: 1.7.1 - GOTAR: /home/ubuntu/go${GOVER}.linux-amd64.tar.gz - post: - - echo $GOVER - - mkdir -p ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME} - - rm -rf ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}/* - - ln -sf ~/${CIRCLE_PROJECT_REPONAME} ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} -general: - build_dir: ../.go_workspace/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME} -dependencies: - cache_directories: - - ~/go1.7.1.linux-amd64.tar.gz - pre: - - echo "GOVER $GOVER" - - echo "GOTAR $GOTAR" - - go version - - test -e ${GOTAR} || wget https://storage.googleapis.com/golang/go${GOVER}.linux-amd64.tar.gz -O ${GOTAR} - - go version | grep "$GOVER " || (sudo rm -rf /usr/local/go; sudo tar -C /usr/local -xzf ${GOTAR}) - - go version - post: - - go env - - pwd - - go get golang.org/x/net/context - - go test -i -race $(go list -f '{{if len .TestGoFiles}}{{.ImportPath}}{{end}}' ./... | grep -v /vendor/) -test: - override: - - go test -race $(go list -f '{{if len .TestGoFiles}}{{.ImportPath}}{{end}}' ./... | grep -v /vendor/) +version: 2.1 +jobs: + build: + docker: + - image: 'cimg/go:1.15.3' + # auth: + # username: mydockerhub-user + # password: $DOCKERHUB_PASSWORD + environment: + CC: gcc + CXX: g++ + GOPATH: /home/ubuntu/.go_workspace + GOVER: 1.7.1 + GOTAR: /home/ubuntu/go${GOVER}.linux-amd64.tar.gz + steps: + - checkout + - run: + name: Unit tests + command: | + go version + test -e ${GOTAR} || wget https://storage.googleapis.com/golang/go${GOVER}.linux-amd64.tar.gz -O ${GOTAR} + go get golang.org/x/net/context + go test -i -race $(go list -f '{{if len .TestGoFiles}}{{.ImportPath}}{{end}}' ./... | grep -v /vendor/)