-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.gitlab-ci.yml
55 lines (46 loc) · 1.05 KB
/
.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
44
45
46
47
48
49
50
51
52
53
54
55
---
image:
name: golang
stages:
- build
- test
- package
before_script:
- mkdir -p /go/src/github.com/individuwill
- ln -s `pwd` /go/src/github.com/individuwill/mcast
- cd /go/src/github.com/individuwill/mcast
build:
stage: build
script:
- printenv
- go build
test_mcast:
stage: test
script:
- go test -v github.com/individuwill/mcast
test_multicast:
stage: test
script:
- go test -v github.com/individuwill/mcast/multicast
test_race:
stage: test
script:
- go test -race -short $(go list ./... | grep -v /vendor/)
# test_memory:
# stage: test
# script:
# - go test -msan -short $(go list ./... | grep -v /vendor/)
test_coverage:
stage: test
script:
- mkdir cover
- for package in $(go list ./... | grep -v /vendor/); do go test -covermode=count -coverprofile "cover/${package##*/}.cov" "$package" ; done
- for cov in $(ls cover/*.cov); do go tool cover -func="$cov" ; done
package:
stage: package
artifacts:
name: mcast-binaries.zip
paths:
- binaries
script:
- ./build.sh