-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
43 lines (36 loc) · 914 Bytes
/
.gitlab-ci.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
image: golang:latest
cache:
paths:
- /apt-cache
- /go/src/github.com
- /go/src/golang.org
- /go/src/google.golang.org
- /go/src/gopkg.in
stages:
- build
- unit test
- acceptance test
go_build:
stage: build
script:
- go build ./...
artifacts:
paths:
- .
lint:
stage: build
script:
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin
- golangci-lint run
unit_test:
stage: unit test
script:
- go install github.com/onsi/ginkgo/v2/ginkgo@latest
- ginkgo -r --randomizeAllSpecs --randomizeSuites --failOnPending --cover --trace --race --progress
- go test -coverprofile=cover.out ./...
- go tool cover -func=cover.out
acceptance_test:
stage: acceptance test
script:
- apt-get update -qq && apt-get install -y -qq python3
- python3 acceptance_test.py