This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
forked from go-kivik/couchdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
92 lines (82 loc) · 2.26 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
87
88
89
90
91
92
stages:
- test
variables:
SRCDIR: /go/src/github.com/go-kivik/couchdb
GO111MODULE: "on"
.test: &test_template
stage: test
services:
- name: couchdb:1.7.2
alias: couch17
- name: couchdb:2.2.0
alias: couch22
- name: apache/couchdb:2.3.1
alias: couch23
- name: apache/couchdb:3.0.0
alias: couch30
variables:
COUCHDB_USER: admin
COUCHDB_PASSWORD: abc123
KIVIK_TEST_DSN_COUCH17: http://admin:abc123@couch17:5984/
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/
before_script:
- ./script/complete_couch1.sh ${KIVIK_TEST_DSN_COUCH17}
- ./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:
- go mod download
- ./script/test_version.sh
- go test -race -tags=livetest ./...
.nomod: &nomod_template
<<: *test_template
script:
- mkdir -p /go/src
- ln -s /builds /go/src/github.com
- cd ${SRCDIR}
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- dep ensure && dep status
- ./script/test_version.sh
- go test -race -tags=livetest ./...
lint:
stage: test
image: golang:1.14
services: []
before_script:
- ''
script:
- go mod download
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.7
- golangci-lint run ./...
coverage:
stage: test
image: golang:1.14
services: []
before_script:
- ''
script:
- go mod download
- ./script/coverage.sh
go-1.11:
<<: *test_template
stage: test
image: golang:1.11
go-1.12:
<<: *test_template
stage: test
image: golang:1.12
go-1.13:
<<: *test_template
stage: test
image: golang:1.13
go-1.14:
<<: *test_template
stage: test
image: golang:1.14
go-rc:
<<: *test_template
stage: test
image: golang:rc
allow_failure: true