.gitlab-ci.yml 3.24 KB
Newer Older
1
image: $CI_REGISTRY/knot/knot-resolver/ci:debian-stable
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
test:comparative:kresd:
66 67 68 69
  stage: test
  script:
    - cp ci/common.sh /tmp
    - cp ci/compare-tests.sh /tmp
70
    - /tmp/compare-tests.sh $(pwd)/kresd_run.sh
71 72 73 74 75 76 77 78 79 80 81 82 83
  artifacts:
    when: always
    expire_in: '1 hour'
    paths:
      - modified_tests
      - base.log
      - base.tests
      - head.log
      - head.tests
  tags:
    - docker
    - linux
    - amd64
84 85 86

# 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.
87
test:latest:kresd:
88 89
  stage: test
  script:
90
    - git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-resolver.git kresd-local-build
91
    - GIT_DIR=$(pwd)/kresd-local-build/.git git log -1
92
    - ( cd kresd-local-build ; git submodule update --init --recursive )
93 94
    - PREFIX=$(pwd)/.local make -C kresd-local-build -k all
    - PREFIX=$(pwd)/.local make -C kresd-local-build install
95 96 97 98 99 100
    - TMPDIR=$(pwd) LD_LIBRARY_PATH=$(pwd)/.local/lib DAEMON=$(pwd)/.local/sbin/kresd MAKEFLAGS="-j $(nproc) --keep-going" ./kresd_run.sh
  artifacts:
    when: on_failure
    expire_in: 1 week
    paths:
      - tmpdeckard*
101 102 103 104
  tags:
    - docker
    - linux
    - amd64
105 106 107 108

# 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
109
test:sanity:unbound:
110 111
  stage: test
  script:
112 113
    - TESTS=sets/resolver/iter_hint_lame.rpl TMPDIR=$(pwd) ./unbound_run.sh
    - TESTS=sets/resolver/iter_lame_root.rpl TMPDIR=$(pwd) ./unbound_run.sh
114 115 116
    # 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
117 118 119 120 121
  artifacts:
    when: on_failure
    expire_in: 1 week
    paths:
      - tmpdeckard*
122 123 124 125
  tags:
    - docker
    - linux
    - amd64
126 127 128 129

# 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
130
test:sanity:pdnsrecursor:
131 132
  stage: test
  script:
133 134 135 136 137 138 139
    - TESTS=sets/resolver/iter_recurse.rpl TMPDIR=$(pwd) ./pdns_run.sh
    - TESTS=sets/resolver/iter_tcbit.rpl TMPDIR=$(pwd) ./pdns_run.sh
  artifacts:
    when: on_failure
    expire_in: 1 week
    paths:
      - tmpdeckard*
140 141 142 143
  tags:
    - docker
    - linux
    - amd64