# CircleCI 2.0 configuration file # Check https://circleci.com/docs/2.0/language-go/ for more details version: 2 jobs: lint: docker: - image: cimg/go:1.20.0 steps: # Don't do a restore_cache here, so we regularly check that the Go # modules are actually fetchable. - checkout - run: go version - run: test -z "$(gofmt -l . | tee /dev/stderr)" - run: go vet ./... resource_class: large test: docker: - image: cimg/go:1.20.0 steps: - checkout - restore_cache: keys: - go-mod-v4-{{ checksum "go.sum" }} - run: go get -v -t -d ./... - save_cache: key: go-mod-v4-{{ checksum "go.sum" }} paths: - "/home/circleci/go/pkg/mod" - run: go test -failfast ./... resource_class: large race_odd: docker: - image: cimg/go:1.20.0 steps: - checkout - restore_cache: keys: - go-mod-v4-{{ checksum "go.sum" }} - run: go get -t -d ./... - run: command: go test -failfast -timeout 20m -race $(go list ./... | sed -n 'n;p') environment: GORACE: "halt_on_error=1" race_even: docker: - image: cimg/go:1.20.0 steps: - checkout - restore_cache: keys: - go-mod-v4-{{ checksum "go.sum" }} - run: go get -t -d ./... - run: command: go test -failfast -timeout 20m -race $(go list ./... | sed -n 'p;n') 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_joining: 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/joining.py environment: RQLITED_PATH: /home/circleci/go/bin/rqlited resource_class: large end_to_end_multi: 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/multi_node.py environment: RQLITED_PATH: /home/circleci/go/bin/rqlited resource_class: large end_to_end_multi_adv: 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/multi_node_adv.py environment: RQLITED_PATH: /home/circleci/go/bin/rqlited resource_class: large end_to_end_autoclustering: 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/auto_clustering.py environment: RQLITED_PATH: /home/circleci/go/bin/rqlited resource_class: large workflows: version: 2 build_and_test: jobs: - lint - test - race_even - race_odd - end_to_end_single - end_to_end_multi - end_to_end_multi_adv - end_to_end_joining - end_to_end_autoclustering