blob: 565d0d9bd59c8b828780f6c6606d4a70f8e04b10 (
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
# TODO: Figure out if we can reuse these jobs but run them after our own checks without having
# to manually merge `stages`.
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
stages:
- ci-test
- aggregate-coverage
- pages
- provisioning
- build
- publish
- test
tests-testing:
stage: ci-test
image: debian:testing
script:
- apt-get update
- apt-get build-dep -y .
- dpkg-buildpackage -us -uc -tc
tests-unstable:
stage: ci-test
image: debian:unstable
script:
- apt-get update
- apt-get build-dep -Ppkg.debputy.ci -y .
- dpkg-buildpackage -Ppkg.debputy.ci -us -uc -tc
code-lint-mypy:
stage: ci-test
image: debian:unstable
script:
- apt-get update
- apt-get build-dep -Ppkg.debputy.ci -y .
- apt-get install -y mypy python3-lxml
# Remove the `|| true` once we get to a sufficient level of typing where we can set the minimum bar
- mypy --html-report mypy-report --junit-format per_file --junit-xml mypy-xunit-report.xml --cobertura-xml-report mypy-cobertura-report src tests || true
artifacts:
paths:
- mypy-report
reports:
junit: mypy-xunit-report.xml
coverage_report:
coverage_format: cobertura
path: mypy-cobertura-report/cobertura.xml
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
tests-unstable-coverage-without-optional-bd:
stage: ci-test
image: debian:unstable
script:
- apt-get update
- apt-get build-dep -Ppkg.debputy.minimal-tests,pkg.debputy.test-coverage -y .
- py.test-3 -v --cov --cov-branch --doctest-modules --junit-xml=xunit-report.xml --cov-report xml:coverage.xml
- dpkg-buildpackage -Ppkg.debputy.minimal-tests -us -uc -tc
after_script:
- mkdir -p coverage-results/tests-unstable-coverage-without-optional-bd
- cp .coverage coverage-results/tests-unstable-coverage-without-optional-bd/coverage
artifacts:
paths:
- coverage-results/tests-unstable-coverage-without-optional-bd
reports:
junit: xunit-report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
tests-unstable-coverage:
stage: ci-test
image: debian:unstable
script:
- apt-get update
- apt-get build-dep -Ppkg.debputy.test-coverage -y .
- py.test-3 -v --cov --cov-branch --doctest-modules --junit-xml=xunit-report.xml --cov-report xml:coverage.xml
after_script:
- mkdir -p coverage-results/tests-unstable-coverage
- cp .coverage coverage-results/tests-unstable-coverage/coverage
artifacts:
paths:
- coverage-results/tests-unstable-coverage
reports:
junit: xunit-report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
tests-unstable-coverage-with-extra-bd:
stage: ci-test
image: debian:unstable
script:
- apt-get update
- apt-get build-dep -Ppkg.debputy.ci,pkg.debputy.test-coverage -y .
- py.test-3 -v --cov --cov-branch --doctest-modules --junit-xml=xunit-report.xml --cov-report xml:coverage.xml
after_script:
- mkdir -p coverage-results/tests-unstable-coverage-with-extra-bd
- cp .coverage coverage-results/tests-unstable-coverage-with-extra-bd/coverage
artifacts:
paths:
- coverage-results/tests-unstable-coverage-with-extra-bd
reports:
junit: xunit-report.xml
coverage_report:
coverage_format: cobertura
path: coverage.xml
aggregate-coverage:
stage: aggregate-coverage
image: debian:unstable
coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
script:
- apt-get update -y
- apt-get install -y python3-coverage
- python3-coverage combine coverage-results/*/coverage*
- python3-coverage html -d coverage-report
- python3-coverage report
artifacts:
paths:
- coverage-report
dependencies:
- tests-unstable-coverage
- tests-unstable-coverage-without-optional-bd
- tests-unstable-coverage-with-extra-bd
pages:
stage: pages
script:
- mkdir public
- mv coverage-report public/
- mv mypy-report public/
dependencies:
- aggregate-coverage
- code-lint-mypy
artifacts:
paths:
- public
only:
- main
variables:
SALSA_CI_DISABLE_WRAP_AND_SORT: 0
SALSA_CI_WRAP_AND_SORT_ARGS: '-abkt'
SALSA_CI_AUTOPKGTEST_ALLOWED_EXIT_STATUS: 0
SALSA_CI_DISABLE_APTLY: 0
debputy-lint:
stage: ci-test
image: debian:sid-slim
script:
- apt-get update -qq && apt-get -qq install --no-install-recommends --yes dh-debputy python3-pygls
- PERL5LIB=lib debputy lint --spellcheck
except:
variables:
- $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
|