blob: 0be074716601b5609f2278cc29b54bf63d039635 (
plain)
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
|
.tests-common:
extends: .common
stage: test
needs: ['download deps']
artifacts:
reports:
junit: junit-test-report.xml
.tests-matrix:
extends: .tests-common
image: golang:${GO_VERSION}
parallel:
matrix:
- GO_VERSION: ["1.16", "1.17", "1.18"]
tests:
extends: .tests-matrix
script:
- echo "Running all unit tests..."
- make test ARGS='-short'
tests-acceptance:
extends: .tests-matrix
script:
- echo "Running just the acceptance tests...."
- make acceptance
race:
extends: .tests-common
script:
- echo "Running race detector"
- make race
cover:
extends: .tests-common
script:
- echo "Running coverage testing"
- make cover
coverage: '/total:.+\(statements\).+\d+\.\d+/'
artifacts:
paths:
- coverage.html
code_quality:
extends: .tests-common
image: golangci/golangci-lint:v1.44.0
variables:
REPORT_FILE: gl-code-quality-report.json
LINT_FLAGS: "--color never --deadline 15m"
OUT_FORMAT: code-climate
script:
- golangci-lint run ./... --out-format ${OUT_FORMAT} ${LINT_FLAGS} | tee ${REPORT_FILE}
timeout: 15 minutes
artifacts:
reports:
codequality: ${REPORT_FILE}
paths:
- ${REPORT_FILE}
check deps:
extends: .tests-common
before_script:
# overwrites the before_script in .common since we don't need to run make cisetup for this job
- echo skipping
script:
- make deps-check
check mocks:
extends: .tests-common
script:
- make mocks-check
|