Try example CircleCI Go config
+
+# Golang CircleCI 2.0 configuration file
+#
+# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
jobs:
- test:
- working_directory: ~/rqlite/src/github.com/rqlite/rqlite
+ build:
docker:
+ # specify the version
- image: circleci/golang:1.13
- steps:
- - run:
- command: echo 'export GOPATH=~/rqlite/' >> $BASH_ENV
- - run: mkdir -p $CIRCLE_WORKING_DIRECTORY
- - run: cd $CIRCLE_WORKING_DIRECTORY
- - run: git clone https://github.com/rqlite/rqlite.git
- - run: cd rqlite
- - run: go get -u -t ./...
- - run: git checkout $CIRCLE_BRANCH
- - run: go vet .
- - run: go test -timeout 60s -v ./...
- race:
- working_directory: ~/rqlite/src/github.com/rqlite/rqlite
- docker:
- - image: circleci/golang:1.13
- steps:
- - checkout
- - run: git checkout $CIRCLE_BRANCH
- - run: git branch
- - run: go get -t -d -v ./...
- - run:
- command: go test -race -timeout 120s -v ./...
- environment:
- GORACE: "halt_on_error=1"
+ # Specify service dependencies here if necessary
+ # CircleCI maintains a library of pre-built images
+ # documented at https://circleci.com/docs/2.0/circleci-images/
+ # - image: circleci/postgres:9.4
- end_to_end:
- working_directory: ~/rqlite/src/github.com/rqlite/rqlite
- docker:
- - image: circleci/golang:1.13
+ #### TEMPLATE_NOTE: go expects specific checkout path representing url
+ #### expecting it in the form of
+ #### /go/src/github.com/circleci/go-tool
+ #### /go/src/bitbucket.org/circleci/go-tool
+ working_directory: /go/src/github.com/rqlite/rqlite
steps:
- checkout
- - run: git checkout $CIRCLE_BRANCH
- - run: sudo apt-get install python-requests
- - run: go get -t -d -v ./...
- - run: (cd cmd/rqlited && go build)
- - run:
- command: system_test/full_system_test.py
- environment:
- RQLITED_PATH: /home/circleci/rqlite/src/github.com/rqlite/rqlite/cmd/rqlited/rqlited
-
-workflows:
- version: 2
- build_and_test:
- jobs:
- - test
- - race
+ # specify any bash command here prefixed with `run: `
+ - run: go get -v -t -d ./...
+ - run: go test -v ./...
