-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
49 lines (40 loc) · 1.02 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
image: fhyx/golang:edge
stages:
- lint
- test
services:
- name: fhyx/postgresql:15e
alias: testingdb
variables:
CGO_ENABLED: '0'
GO111MODULE: 'on'
GOPATH: /cache/go
GOPRIVATE: daxv.cn,fhyx.tech,hyyl.xyz
GOPROXY: https://goproxy.io,direct
PGX_QUERY_DEBUG: 1
DB_NAME: testing
DB_USER: testing
DB_PASS: develop
PG_EXTENSIONS: 'btree_gin btree_gist pg_trgm zhparser'
TZ: Hongkong
TEST_PG_STORE_DSN: postgres://testing:develop@testingdb:5432/testing?sslmode=disable
before_script:
# Go Environments
- go env
lint:
stage: lint
services: []
script:
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- go vet ./... && ${GOPATH}/bin/golangci-lint run --disable structcheck ./...
test-models:
stage: test
services: []
script:
- go test -v -cover ./models/comm ./models/idgen ./models/oid
coverage: '/coverage: \d+.\d+% of statements/'
test-stores:
stage: test
script:
- go test -v -cover ./stores/pgx
coverage: '/coverage: \d+.\d+% of statements/'