|
|
|
# CircleCI 2.0 configuration file
|
|
|
|
# Check https://circleci.com/docs/2.0/language-go/ for more details
|
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
docker:
|
|
|
|
- image: cimg/go:1.20.0
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- go-mod-v4-{{ checksum "go.sum" }}
|
|
|
|
- run: go version
|
|
|
|
- run: go get -v -t -d ./...
|
|
|
|
- save_cache:
|
|
|
|
key: go-mod-v4-{{ checksum "go.sum" }}
|
|
|
|
paths:
|
|
|
|
- "/home/circleci/go/pkg/mod"
|
|
|
|
- run: test -z "$(gofmt -l . | tee /dev/stderr)"
|
|
|
|
- run: go vet ./...
|
|
|
|
- run: go test -failfast ./...
|
|
|
|
resource_class: large
|
|
|
|
|
|
|
|
race:
|
|
|
|
docker:
|
|
|
|
- image: cimg/go:1.20.0
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- go-mod-v4-{{ checksum "go.sum" }}
|
|
|
|
- run: go version
|
|
|
|
- run: go get -t -d ./...
|
|
|
|
- run:
|
|
|
|
command: go test -failfast -timeout 20m -race ./...
|
|
|
|
environment:
|
|
|
|
GORACE: "halt_on_error=1"
|
|
|
|
|
|
|
|
end_to_end_single:
|
|
|
|
docker:
|
|
|
|
- image: cimg/go:1.20.0
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- go-mod-v4-{{ checksum "go.sum" }}
|
|
|
|
- run: sudo apt-get update
|
|
|
|
- run: sudo apt-get install python3
|
|
|
|
- run: sudo apt install python3-pip
|
|
|
|
- run: python3 -m pip install requests
|
|
|
|
- run: go version
|
|
|
|
- run: go get -t -d -v ./...
|
|
|
|
- run: go install -tags osusergo,netgo,sqlite_omit_load_extension
|
|
|
|
-ldflags="-extldflags=-static" ./...
|
|
|
|
- run:
|
|
|
|
command: python3 system_test/e2e/single_node.py
|
|
|
|
environment:
|
|
|
|
RQLITED_PATH: /home/circleci/go/bin/rqlited
|
|
|
|
resource_class: large
|
|
|
|
|
|
|
|
end_to_end_multi:
|
|
|
|
docker:
|
|
|
|
- image: cimg/go:1.20.0
|
|
|
|
- image: consul
|
|
|
|
- image: gcr.io/etcd-development/etcd:v3.5.1
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- go-mod-v4-{{ checksum "go.sum" }}
|
|
|
|
- run: sudo apt-get update
|
|
|
|
- run: sudo apt-get install python3
|
|
|
|
- run: sudo apt install python3-pip
|
|
|
|
- run: python3 -m pip install requests
|
|
|
|
- run: go version
|
|
|
|
- run: go get -t -d -v ./...
|
|
|
|
- run: go install -tags osusergo,netgo,sqlite_omit_load_extension
|
|
|
|
-ldflags="-extldflags=-static" ./...
|
|
|
|
- run:
|
|
|
|
command: python3 system_test/e2e/multi_node.py
|
|
|
|
environment:
|
|
|
|
RQLITED_PATH: /home/circleci/go/bin/rqlited
|
|
|
|
resource_class: large
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build_and_test:
|
|
|
|
jobs:
|
|
|
|
- test
|
|
|
|
- race
|
|
|
|
- end_to_end
|