-
Notifications
You must be signed in to change notification settings - Fork 13
/
.gitlab-ci.yml
130 lines (116 loc) · 3.52 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
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
image: $CI_REGISTRY/knot/knot-resolver/ci/debian-buster:knot-3.0
variables:
LC_ALL: C.UTF-8
stages:
- test
.test: &test
stage: test
tags:
- docker
- linux
- amd64
.privileged_test: &privileged_test
stage: test
tags:
- privileged
test:augeas:
<<: *test
script:
- augparse pydnstest/deckard.aug
test:flake8:
<<: *test
script:
- python3 -m flake8 --max-line-length=100 . && echo "OK, no flake8 errors detected"
test:mypy:
<<: *test
script:
- ci/mypy-run.sh && echo "OK, no mypy error detected"
test:pylint:
<<: *test
script:
- ci/pylint-run.sh
test:rplint:
<<: *test
script:
- cp ci/common.sh /tmp
- cp ci/compare-rplint.sh /tmp
- /tmp/compare-rplint.sh
test:unittests:
<<: *privileged_test
script:
- python3 -m pytest
# There are no tests in the repo which use this feature but others do
# and do not want to cause them breakage
test:sanity:raw_id:
<<: *privileged_test
script:
- unshare -rn ci/raw_id_check.sh
# changes in Deckard itself must not change result of tests
test:comparative:kresd:
<<: *privileged_test
script:
# test kresd binary
- git clone --recurse-submodules -j8 --depth=1 https://gitlab.nic.cz/knot/knot-resolver.git /tmp/kresd-local-build
- pushd /tmp/kresd-local-build
- git log -1
- meson build_local --default-library=static --prefix=/tmp/.local
- ninja -C build_local install
- popd
# compare results from latest Deckard with results from merge base
- cp ci/common.sh /tmp
- cp ci/compare-tests.sh /tmp
- cp ci/junit-compare.py /tmp
- PATH=/tmp/.local/sbin:$PATH /tmp/compare-tests.sh $(pwd)/kresd_run.sh
artifacts:
when: always
expire_in: '1 hour'
paths:
- modified_tests
- base.xml
- head.xml
# Run all tests on the latest kresd version to ensure that we not push tests
# which do not work on latest kresd. It would lead to breakage in kresd CI.
test:latest:kresd:
<<: *privileged_test
script:
- git clone --recurse-submodules -j8 --depth=1 https://gitlab.nic.cz/knot/knot-resolver.git kresd-local-build
- pushd kresd-local-build
- git log -1
- meson build_local --default-library=static --prefix="$PWD/../.local"
- ninja -C build_local install
- popd
- TMPDIR=$(pwd) PATH=$(pwd)/.local/sbin:$PATH ./kresd_run.sh -n $(nproc)
artifacts:
when: on_failure
expire_in: 1 week
paths:
- tmpdeckard*
# sanity check that Unbound under Deckard still works
# I've selected the only tests which are working
# on kresd and Unbound 1.5.8 as well as 1.6.0
test:sanity:unbound:
<<: *privileged_test
script:
- TMPDIR=$(pwd) ./unbound_run.sh --scenarios=sets/resolver/iter_hint_lame.rpl
- TMPDIR=$(pwd) ./unbound_run.sh --scenarios=sets/resolver/iter_lame_root.rpl
# these do not work with Unbound 1.5.8 which is in CI container
#- TESTS=sets/resolver/nsec_wildcard_answer_response.rpl ./unbound_run.sh
#- TESTS=sets/resolver/world_cz_lidovky_www.rpl ./unbound_run.sh
artifacts:
when: on_failure
expire_in: 1 week
paths:
- tmpdeckard*
# sanity check that PowerDNS recursor under Deckard still works
# I've selected couple tests which are working
# on kresd and PowerDNS recursor 4.0.0~alpha2 as well as 4.0.4
test:sanity:pdnsrecursor:
<<: *privileged_test
script:
- TMPDIR=$(pwd) ./pdns_run.sh --scenarios=sets/resolver/iter_recurse.rpl
- TMPDIR=$(pwd) ./pdns_run.sh --scenarios=sets/resolver/iter_tcbit.rpl
artifacts:
when: on_failure
expire_in: 1 week
paths:
- tmpdeckard*