-
Notifications
You must be signed in to change notification settings - Fork 15
/
.gitlab-ci.yml
86 lines (76 loc) · 1.98 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
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
stages:
- test
variables:
SRCDIR: /go/src/github.com/go-kivik/couchdb
GO111MODULE: "on"
.test: &test_template
stage: test
services:
- name: couchdb:2.2.0
alias: couch22
- name: apache/couchdb:2.3.1
alias: couch23
- name: couchdb:3.0.1
alias: couch30
- name: couchdb:3.1.2
alias: couch31
- name: couchdb:3.2.3
alias: couch32
- name: couchdb:3.3.2
alias: couch33
variables:
COUCHDB_USER: admin
COUCHDB_PASSWORD: abc123
KIVIK_TEST_DSN_COUCH22: http://admin:abc123@couch22:5984/
KIVIK_TEST_DSN_COUCH23: http://admin:abc123@couch23:5984/
KIVIK_TEST_DSN_COUCH30: http://admin:abc123@couch30:5984/
KIVIK_TEST_DSN_COUCH31: http://admin:abc123@couch31:5984/
KIVIK_TEST_DSN_COUCH32: http://admin:abc123@couch32:5984/
KIVIK_TEST_DSN_COUCH33: http://admin:abc123@couch33:5984/
before_script:
- ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH22}
- ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH23}
- ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH30}
- ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH31}
- ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH32}
- ./script/complete_couch2.sh ${KIVIK_TEST_DSN_COUCH33}
script:
- go mod download
- ./script/test_version.sh
- go test -race ./...
linter:
stage: test
image: golangci/golangci-lint:v1.54.0
script:
- go mod download
- golangci-lint run ./...
- ./script/check-license.sh
- go mod tidy -compat=1.17 && git diff --exit-code
coverage:
stage: test
image: golang:1.20
services: []
before_script:
- ""
script:
- go mod download
- ./script/coverage.sh
go-1.17:
<<: *test_template
image: golang:1.17
go-1.18:
<<: *test_template
image: golang:1.18
go-1.19:
<<: *test_template
image: golang:1.19
go-1.20:
<<: *test_template
image: golang:1.20
go-1.21:
<<: *test_template
image: golang:1.21
go-rc:
<<: *test_template
image: golang:rc
allow_failure: true