Debian Codegraph @

.circleci/config.yml

raw
1 ---
2 version: 2.1
3
4 executors:
5 golang:
6 docker:
7 - image: cimg/go:1.25
8
9 jobs:
10 generate:
11 executor: golang
12 steps:
13 - checkout
14 - run: go install golang.org/x/tools/cmd/stringer@latest
15 - run: go install github.com/golang/mock/mockgen@latest
16 - run: go generate
17 - run: git diff --exit-code
18
19 lint:
20 executor: golang
21 steps:
22 - checkout
23 - run: make lint
24
25 fuzz:
26 executor: golang
27 steps:
28 - checkout
29 - run: go test -fuzztime 60s -v -tags marshal -fuzz '^FuzzUnmarshal$'
30
31 test:
32 parameters:
33 goarch:
34 type: string
35 goversion:
36 type: string
37 docker:
38 - image: cimg/go:<< parameters.goversion >>
39 environment:
40 GOARCH: << parameters.goarch >>
41 GOSNMP_TARGET: "127.0.0.1"
42 GOSNMP_PORT: "161"
43 GOSNMP_TARGET_IPV4: "127.0.0.1"
44 GOSNMP_PORT_IPV4: "161"
45 GOSNMP_TARGET_IPV6: "::1"
46 GOSNMP_PORT_IPV6: "161"
47
48 steps:
49 - checkout
50 - run: sudo apt-get update
51 - run: sudo apt-get -y install snmpd
52 - run: sudo ./snmp_users.sh
53 - run: sudo sed -i -e 's/^agentaddress.*$/agentaddress 127.0.0.1/' /etc/snmp/snmpd.conf
54 - run: sudo service snmpd restart
55 - run: go test -v -tags helper
56 - run: go test -v -tags marshal
57 - run: go test -v -tags misc
58 - run: go test -v -tags api
59 - run: go test -v -tags end2end
60 # - run: go test -v -tags trap
61 - run: |
62 if [[ "${GOARCH}" == "amd64" ]]; then
63 go test -v -tags all -race
64 else
65 echo "Not running -race"
66 fi
67
68 workflows:
69 version: 2
70 test:
71 jobs:
72 - generate
73 - lint
74 - fuzz
75 - test:
76 matrix:
77 parameters:
78 goarch:
79 - "amd64"
80 - "386"
81 goversion:
82 - "1.24"
83 - "1.25"