1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
6.0 KiB
YAML

# 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
5 years ago
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
5 years ago
race_odd:
docker:
- image: cimg/go:1.20.0
steps:
- checkout
- restore_cache:
keys:
- go-mod-v4-{{ checksum "go.sum" }}
2 years ago
- 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:
5 years ago
docker:
- image: cimg/go:1.20.0
- image: consul
- image: gcr.io/etcd-development/etcd:v3.5.1
5 years ago
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
5 years ago
end_to_end_auto_backup:
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 boto3
- 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_backup.py
environment:
RQLITED_PATH: /home/circleci/go/bin/rqlited
resource_class: large
5 years ago
workflows:
version: 2
build_and_test:
jobs:
- lint
5 years ago
- 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
- end_to_end_auto_backup