forked from grafana-tools/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
110 lines (104 loc) · 2.8 KB
/
.travis.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
---
language: go
services:
- docker
# Different Grafana + Go versions that will be tested.
jobs:
include:
- name: "Grafana 6.7.1 1.14.x"
env:
- "GRAFANA_VERSION=6.7.1"
- "GRAFANA_INTEGRATION=1"
go: "1.14.x"
- name: "Grafana 6.6.2 1.14.x"
env:
- "GRAFANA_VERSION=6.6.2"
- "GRAFANA_INTEGRATION=1"
go: "1.14.x"
- name: "Grafana 6.5.3 1.14.x"
env:
- "GRAFANA_VERSION=6.5.3"
- "GRAFANA_INTEGRATION=1"
go: "1.14.x"
- name: "Grafana 6.4.5 1.14.x"
env:
- "GRAFANA_VERSION=6.4.5 1.13.x"
- "GRAFANA_INTEGRATION=1"
go: "1.13.x"
- name: "Grafana 6.7.1 1.13.x"
env:
- "GRAFANA_VERSION=6.7.1"
- "GRAFANA_INTEGRATION=1"
go: "1.13.x"
- name: "Grafana 6.6.2 1.13.x"
env:
- "GRAFANA_VERSION=6.6.2"
- "GRAFANA_INTEGRATION=1"
go: "1.13.x"
- name: "Grafana 6.5.3 1.13.x"
env:
- "GRAFANA_VERSION=6.5.3"
- "GRAFANA_INTEGRATION=1"
go: "1.13.x"
- name: "Grafana 6.4.5 1.13.x"
env:
- "GRAFANA_VERSION=6.4.5 1.13.x"
- "GRAFANA_INTEGRATION=1"
go: "1.13.x"
- name: "Grafana 6.7.1 1.12.x"
env:
- "GRAFANA_VERSION=6.7.1"
- "GRAFANA_INTEGRATION=1"
go: "1.12.x"
- name: "Grafana 6.6.2 1.12.x"
env:
- "GRAFANA_VERSION=6.6.2"
- "GRAFANA_INTEGRATION=1"
go: "1.12.x"
- name: "Grafana 6.5.3 1.12.x"
env:
- "GRAFANA_VERSION=6.5.3"
- "GRAFANA_INTEGRATION=1"
go: "1.12.x"
- name: "Grafana 6.4.5 1.12.x"
env:
- "GRAFANA_VERSION=6.4.5"
- "GRAFANA_INTEGRATION=1"
go: "1.12.x"
- name: "Grafana 6.7.1 1.11.x"
env:
- "GRAFANA_VERSION=6.7.1"
- "GRAFANA_INTEGRATION=1"
go: "1.11.x"
- name: "Grafana 6.6.2 1.11.x"
env:
- "GRAFANA_VERSION=6.6.2"
- "GRAFANA_INTEGRATION=1"
go: "1.11.x"
- name: "Grafana 6.5.3 1.11.x"
env:
- "GRAFANA_VERSION=6.5.3"
- "GRAFANA_INTEGRATION=1"
go: "1.11.x"
- name: "Grafana 6.4.5 1.11.x"
env:
- "GRAFANA_VERSION=6.4.5"
- "GRAFANA_INTEGRATION=1"
go: "1.11.x"
# Required for coverage.
before_install:
- go get golang.org/x/tools/cmd/cover
- go get github.com/mattn/goveralls
# Run Grafana
- "docker pull grafana/grafana:$GRAFANA_VERSION"
- "docker network create grafana"
- "docker run -d -p 9222:9222 --network grafana --rm --name headless-shell --shm-size 2G chromedp/headless-shell"
- "docker run --network grafana -e GF_AUTH_ANONYMOUS_ENABLED=true --rm -d -p 3000:3000 grafana/grafana:$GRAFANA_VERSION"
before_script:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin
# only one subpackage tested yet
script:
- go build -a -v ./...
- golangci-lint run
- go test -v -covermode=count -coverprofile=coverage.out
- $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci