-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathconfig.yml
74 lines (74 loc) · 2.06 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
version: 2
jobs:
build:
docker:
- image: golang:1.19
steps:
- checkout
- run: go build ./...
format:
docker:
- image: golang:1.19
steps:
- checkout
- run:
name: Install gofumports
command: go install mvdan.cc/gofumpt@latest
- run:
name: Run gofumports on all non-generated files
command: grep -L -R "^\/\/ Code generated .* DO NOT EDIT\.$" --exclude-dir=.git --exclude-dir=vendor --include="*.go" | xargs -n 1 gofumpt -w
- run:
name: Check for any changes
command: git diff --exit-code
vendor:
docker:
- image: golang:1.19
steps:
- checkout
- run: go mod verify
- run: go mod tidy
- run: git diff --exit-code
generate:
docker:
- image: golang:1.19
steps:
- checkout
- run: make install
- run: make generate
- run: go mod tidy
- run: git diff --exit-code
test:
machine:
image: ubuntu-2204:2022.04.1
# The CircleCI user's GOPATH
working_directory: /home/circleci/.go_workspace/src/github.com/johanbrandhorst/certify
steps:
- checkout
- run:
name: Update Go installation
command: |
wget https://github.com/lpar/goup/releases/download/1.0/goup-linux-x64.xz &&
xz --decompress goup-linux-x64.xz &&
chmod +x goup-linux-x64
sudo rm -rf /usr/local/go &&
yes | sudo ./goup-linux-x64 --force --os linux --arch amd64 || true # swallow exit 141
- run: go install github.com/onsi/ginkgo/ginkgo
- run: ginkgo -v -r -coverprofile=coverage.txt -cover --randomizeAllSpecs --randomizeSuites --failOnPending --trace --race --progress --skipPackage=vendor --skipMeasurements
- run: bash <(curl -s https://codecov.io/bash)
docker:
docker:
- image: docker
steps:
- setup_remote_docker
- checkout
- run: docker build .
workflows:
version: 2
all:
jobs:
- build
- format
- vendor
- generate
- test
- docker