forked from Consensys/gnark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
26 lines (26 loc) · 1.07 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
version: 2.1
jobs:
build:
docker:
- image: circleci/golang:latest
steps:
- checkout
- run: mkdir -p /tmp/test-results
- restore_cache:
keys:
- go-mod-v2-{{ checksum "go.sum" }}
- run: if [[ -n $(gofmt -l .) ]]; then echo "Please run gofmt"; exit 1; fi
- run: go vet -v ./...
- run: go test -v ./cmd/ -run=VersionIsGenerated # ensure version is generated
- run: go get golang.org/x/tools/cmd/goimports
- run: go generate ./...
- run: git update-index --assume-unchanged go.mod
- run: git update-index --assume-unchanged go.sum
- run: if [[ -n $(git status --porcelain) ]]; then echo "Git repo is dirty after runing go generate -- please don't modify generated files"; echo $(git diff);echo $(git status --porcelain); exit 1; fi
- run: gotestsum --junitfile /tmp/test-results/results.xml -- ./... -short -v
- store_test_results:
path: /tmp/test-results
- save_cache:
key: go-mod-v2-{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"