1image: debian:sid
2
3before_script:
4  - apt update -qq
5  - apt install -qq -y eatmydata
6  - eatmydata apt install -qq -y --no-install-recommends
7    git ca-certificates
8  - eatmydata apt build-dep -qq -y .
9  - ./autogen
10
11# Test whether the release can be done.
12dist-check:
13  stage: test
14  script:
15    - eatmydata apt install -qq -y --no-install-recommends
16      libmodule-build-perl
17    - ./configure
18    - make distcheck
19
20# Test whether the unit tests pass.
21unit-tests:
22  stage: test
23  script:
24    - eatmydata apt install -qq -y --no-install-recommends
25      fakeroot gpg cppcheck shellcheck aspell aspell-en codespell i18nspector
26      libtest-strict-perl libtest-minimumversion-perl libtest-perl-critic-perl
27      libtest-pod-perl libtest-pod-coverage-perl libtest-spelling-perl
28      libtest-synopsis-perl
29    - ./configure
30    - make check TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc)
31                 AUTHOR_TESTING=1
32
33# Test whether the unit tests pass on a VPATH build.
34vpath-tests:
35  stage: test
36  script:
37    - mkdir -p build-tree
38    - cd build-tree
39    - ../configure
40    - make check TESTSUITEFLAGS=--verbose TEST_PARALLEL=$(nproc)
41
42# Test whether the external functional tests pass.
43func-tests:
44  stage: test
45  script:
46    - ./configure
47    - make
48    - git clone https://git.dpkg.org/git/dpkg/dpkg-tests.git
49    - cd dpkg-tests
50    - echo "DPKG_SERIES = 1.18.x" >>.pkg-tests.conf
51    - echo "DPKG_TESTSUITE_OPTIONS = debug not-root" >>.pkg-tests.conf
52    - echo "DPKG_BUILDTREE = $(realpath ..)" >>.pkg-tests.conf
53    - ./db-regen
54    - eatmydata make test
55