.gitlab-ci.yml 3.76 KB
Newer Older
1
image: $CI_REGISTRY/knot/knot-resolver/ci/debian-stable:knot-2.7
2 3 4 5 6 7
variables:
  LC_ALL: C.UTF-8

stages:
  - test

8 9 10 11 12 13 14 15 16
test:augeas:
  stage: test
  script:
    - augparse pydnstest/deckard.aug
  tags:
    - docker
    - linux
    - amd64

17
test:pep8:
18 19 20 21
  stage: test
  script:
    - cp ci/common.sh /tmp
    - cp ci/compare-pep8.sh /tmp
22
    - /tmp/compare-pep8.sh
23 24 25 26 27
  tags:
    - docker
    - linux
    - amd64

28
test:pylint:
29 30 31 32
  stage: test
  script:
    - cp ci/common.sh /tmp
    - cp ci/compare-pylint.sh /tmp
33
    - /tmp/compare-pylint.sh
34 35 36 37 38 39 40 41 42 43 44
  artifacts:
    when: on_failure
    expire_in: '1 hour'
    paths:
      - base.log
      - head.log
  tags:
    - docker
    - linux
    - amd64

45 46 47 48 49 50 51 52 53 54 55
test:rplint:
  stage: test
  script:
    - cp ci/common.sh /tmp
    - cp ci/compare-rplint.sh /tmp
    - /tmp/compare-rplint.sh
  tags:
    - docker
    - linux
    - amd64

56
test:unittests:
57 58
  stage: test
  script:
59
    - make check
60 61 62 63 64
  tags:
    - docker
    - linux
    - amd64

65
# changes in Deckard itself must not change result of tests
66
test:comparative:kresd:
67 68
  stage: test
  script:
69 70 71 72 73 74 75
    # test kresd binary
    - git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git /tmp/kresd-local-build
    - GIT_DIR=/tmp/kresd-local-build/.git git log -1
    - ( cd /tmp/kresd-local-build ; git submodule update --init --recursive )
    - PREFIX=/tmp/.local make -C /tmp/kresd-local-build -k all
    - PREFIX=/tmp/.local make -C /tmp/kresd-local-build install
    # compare results from latest Deckard with results from merge base
76 77
    - cp ci/common.sh /tmp
    - cp ci/compare-tests.sh /tmp
78
    - cp ci/junit-compare.py /tmp
79
    - LD_LIBRARY_PATH=/tmp/.local/lib PATH=/tmp/.local/sbin:$PATH /tmp/compare-tests.sh $(pwd)/kresd_run.sh
80 81 82 83 84
  artifacts:
    when: always
    expire_in: '1 hour'
    paths:
      - modified_tests
85 86
      - base.xml
      - head.xml
87 88 89 90
  tags:
    - docker
    - linux
    - amd64
91 92 93

# 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.
94
test:latest:kresd:
95 96
  stage: test
  script:
97
    - git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git kresd-local-build
98
    - GIT_DIR=$(pwd)/kresd-local-build/.git git log -1
99
    - ( cd kresd-local-build ; git submodule update --init --recursive )
100 101
    - PREFIX=$(pwd)/.local make -C kresd-local-build -k all
    - PREFIX=$(pwd)/.local make -C kresd-local-build install
102
    - TMPDIR=$(pwd) LD_LIBRARY_PATH=$(pwd)/.local/lib PATH=$(pwd)/.local/sbin:$PATH ./kresd_run.sh -n $(nproc)
103 104 105 106 107
  artifacts:
    when: on_failure
    expire_in: 1 week
    paths:
      - tmpdeckard*
108 109 110 111
  tags:
    - docker
    - linux
    - amd64
112 113 114 115

# 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
116
test:sanity:unbound:
117 118
  stage: test
  script:
119 120
    - TMPDIR=$(pwd) ./unbound_run.sh -k sets/resolver/iter_hint_lame.rpl
    - TMPDIR=$(pwd) ./unbound_run.sh -k sets/resolver/iter_lame_root.rpl
121 122 123
    # 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
124 125 126 127 128
  artifacts:
    when: on_failure
    expire_in: 1 week
    paths:
      - tmpdeckard*
129 130 131 132
  tags:
    - docker
    - linux
    - amd64
133 134 135 136

# 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
137
test:sanity:pdnsrecursor:
138 139
  stage: test
  script:
140 141
    - TMPDIR=$(pwd) ./pdns_run.sh -k sets/resolver/iter_recurse.rpl
    - TMPDIR=$(pwd) ./pdns_run.sh -k sets/resolver/iter_tcbit.rpl
142 143 144 145 146
  artifacts:
    when: on_failure
    expire_in: 1 week
    paths:
      - tmpdeckard*
147 148 149 150
  tags:
    - docker
    - linux
    - amd64