blob: 9d54c042983d0b0d7411d0db7829e31291e5c7f9 (
plain)
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
|
---
stages:
- test
- validate
- integration-test
test:
image: golang:alpine
stage: test
script:
- apk add build-base
- apk add git
- go get ./... && go test -v ./...
tags:
- linux
validate:
image: golang:alpine
stage: test
script: |
apk add build-base git jq curl
go version
go env
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/securego/gosec/v2/cmd/gosec@latest
export PATH=$(go env GOPATH)/bin:$PATH
go vet ./...
gofmt -s -l . && [ -z "$(gofmt -s -l .)" ]
# See: https://staticcheck.io/docs/checks
staticcheck -checks inherit,ST1016,ST1020,ST1021,ST1022,ST1023 ./...
# gosec does not handle modules correctly.
# See: https://github.com/securego/gosec/issues/622
gosec ./...
make check-yawning-obfs4
go mod tidy
git diff --exit-code -- go.mod go.sum
integration-test:
image: debian
stage: test
script:
- apt-get -q update && env DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends docker docker.io make
- make integration
tags:
- linux
|