---
.build: &build
  services:
  - postgres:9.6
  variables:
    POSTGRES_DB: sreview
    POSTGRES_USER: sreview
    POSTGRES_PASSWORD: ""
    SREVIEW_TESTDB: sreview;host=postgres;user=sreview
  image: $CI_JOB_NAME
  script:
  - apt-get update; apt-get -y --no-install-recommends install inkscape ffmpeg bs1770gain
  - cpanm ExtUtils::Depends
  - cpanm --installdeps .
  - perl Makefile.PL
  - make TEST_VERBOSE=1 test

perl:latest:
  <<: *build

perl:5.24:
  <<: *build

---
stages:
- test
- deb

.build: &build
  stage: test
  services:
  - postgres:9.6
  variables:
    POSTGRES_DB: sreview
    POSTGRES_USER: sreview
    POSTGRES_PASSWORD: ""
    SREVIEW_TESTDB: sreview;host=postgres;user=sreview
  image: $CI_JOB_NAME
  script:
  - apt-get update; apt-get -y --no-install-recommends install inkscape ffmpeg bs1770gain
  - cpanm ExtUtils::Depends
  - cpanm --installdeps .
  - perl Makefile.PL
  - make TEST_VERBOSE=1 test

perl:latest:
  <<: *build

perl:5.24:
  <<: *build

.deb: &deb
  stage: deb
  image: $CI_JOB_NAME
  before_script:
  - apt-get update; apt-get -y --no-install-recommends install devscripts equivs
  - mk-build-deps -r -i -t "apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends"
  script:
  - dpkg-buildpackage -us -uc -i -I.git
  after_sccript:
  - mkdir products
  - dcmd mv ../*ges products/
  artifacts:
    paths:
    - products

debian:stable:
  <<: *deb

debian:unstable:
  <<: *deb

Add debian package build test, too
Add debian package build test, too
