Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test.yml « ci « .gitlab - gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 74b162fa42bf1a8175304c794009aaa06aa0538c (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
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
.tests:
  extends: .go-mod-cache
  stage: test
  tags:
    - gitlab-org-docker
  needs: ['download deps']
  script:
    - echo "Running all tests without daemonizing..."
    - make setup
    - make test
    - make junit-report
  artifacts:
    paths:
      - bin/gitlab-pages
    reports:
      junit: junit-test-report.xml

.tests-acceptance-deamon:
  extends: .go-mod-cache
  stage: test
  tags:
    - gitlab-org-docker
  needs: [ 'download deps' ]
  script:
    - echo "Running just the acceptance tests daemonized (tmpdir)...."
    - TEST_DAEMONIZE=tmpdir make acceptance
    - echo "Running just the acceptance tests daemonized (inplace)...."
    - TEST_DAEMONIZE=inplace make acceptance
  artifacts:
    paths:
      - bin/gitlab-pages

test:1.13:
  extends: .tests
  image: golang:1.13

test-acceptance:1.13:
  extends: .tests-acceptance-deamon
  image: golang:1.13

test:1.14:
  extends: .tests
  image: golang:1.14

test-acceptance:1.14:
  extends: .tests-acceptance-deamon
  image: golang:1.14

test:1.15:
  extends: .tests
  image: golang:1.15
test-acceptance:1.15:
  extends: .tests-acceptance-deamon
  image: golang:1.15

race:
  extends: .go-mod-cache
  stage: test
  needs: ['download deps']
  tags:
    - gitlab-org-docker
  script:
    - echo "Running race detector"
    - make race

cover:
  stage: test
  extends: .go-mod-cache
  needs: ['download deps']
  script:
    - make setup
    - make generate-mocks
    - make cover
  coverage: '/total:.+\(statements\).+\d+\.\d+/'
  artifacts:
    paths:
      - coverage.html

code_quality:
  stage: test
  extends: .go-mod-cache
  needs: ['download deps']
  image: golangci/golangci-lint:v1.27.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:
  stage: test
  extends: .go-mod-cache
  needs: ['download deps']
  script:
    - make deps-check