.gitlab-ci.yml 1.08 KB
Newer Older
Gregory Ashton's avatar
Gregory Ashton committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# This script is an edited version of the example found at
# https://git.ligo.org/lscsoft/example-ci-project/blob/python/.gitlab-ci.yml
# Each 0th-indendation level is a job that will be run within GitLab CI
# The only exception are a short list of reserved keywords
#
# https://docs.gitlab.com/ee/ci/yaml/#gitlab-ci-yml

# stages is a reserved keyword that defines job dependencies and
# parallelization. each stage runs in parallel but must complete
# before the next stage begins

stages:
  - test
  - deploy

# test example on Debian 8 "jessie"
exitcode-jessie:
  stage: test
  image: ligo/software:jessie
  script:
21
    - pip install -r ../requirements.txt
Gregory Ashton's avatar
Gregory Ashton committed
22 23
    - pip install coverage
    - pip install coverage-badge
24
    - coverage run test/*.py
25
    - coverage html --include=../peyote/*
Gregory Ashton's avatar
Gregory Ashton committed
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    - coverage-badge -o coverage.svg
  artifacts:
    paths:
      - htmlcov/
      - coverage.svg

pages:
  stage: deploy
  dependencies:
    - exitcode-jessie
  script:
    - mv htmlcov/ public/
    - mv coverage.svg public/
  artifacts:
    paths:
      - public
    expire_in: 30 days
  #only:
    #- master