.gitlab-ci.yml 1.02 KB
Newer Older
Nigel Kukard's avatar
Nigel Kukard committed
1
stages:
Nigel Kukard's avatar
Nigel Kukard committed
2
  - quality
Nigel Kukard's avatar
Nigel Kukard committed
3
  - tests
Nigel Kukard's avatar
Nigel Kukard committed
4
  - install
Nigel Kukard's avatar
Nigel Kukard committed
5

Nigel Kukard's avatar
Nigel Kukard committed
6 7
code-quality:
  stage: quality
Nigel Kukard's avatar
Nigel Kukard committed
8
  script:
Nigel Kukard's avatar
Nigel Kukard committed
9
    - export DEBIAN_FRONTEND=noninteractive
Nigel Kukard's avatar
Nigel Kukard committed
10 11
    - apt-get update
    - apt-get dist-upgrade -y
12
    - apt-get install -y perl-modules
13 14
    - apt-get install -y make
    - apt-get install -y libperl-critic-perl
Nigel Kukard's avatar
Nigel Kukard committed
15 16 17 18 19 20 21 22
    - perlcritic --gentle "$CI_PROJECT_DIR"

make-test:
  stage: tests
  script:
    - export DEBIAN_FRONTEND=noninteractive
    - apt-get update
    - apt-get dist-upgrade -y
23
    - apt-get install -y perl-modules
Nigel Kukard's avatar
Nigel Kukard committed
24
    - apt-get install -y make
25
    - apt-get install -y libdevel-cover-perl libpod-coverage-perl
Nigel Kukard's avatar
Nigel Kukard committed
26
    - cd "$CI_PROJECT_DIR"
Nigel Kukard's avatar
Nigel Kukard committed
27
    - perl Makefile.PL
28 29
    - cover -test | tee devel-coverage.txt
    - grep "^Total" devel-coverage.txt | awk '{ print "(" $8 "%) covered" }'
Nigel Kukard's avatar
Nigel Kukard committed
30

Nigel Kukard's avatar
Nigel Kukard committed
31 32 33 34 35 36
make-install:
  stage: install
  script:
    - export DEBIAN_FRONTEND=noninteractive
    - apt-get update
    - apt-get dist-upgrade -y
37
    - apt-get install -y perl-modules
Nigel Kukard's avatar
Nigel Kukard committed
38 39 40 41 42
    - apt-get install -y make
    - cd "$CI_PROJECT_DIR"
    - perl Makefile.PL
    - make install