.gitlab-ci.yml 1.29 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 25 26 27 28
    - coverage erase
    - coverage run -a test/prior_tests.py
    - coverage run -a test/tests.py
    - coverage run -a test/waveform_generator_tests.py
    - coverage run -a test/noise_realisation_tests.py
29
    - coverage html --include=tupak/*
30
    - coverage-badge -o coverage_badge.svg -f
Gregory Ashton's avatar
Gregory Ashton committed
31 32 33
  artifacts:
    paths:
      - htmlcov/
34
      - coverage_badge.svg
Gregory Ashton's avatar
Gregory Ashton committed
35 36 37 38 39 40 41

pages:
  stage: deploy
  dependencies:
    - exitcode-jessie
  script:
    - mv htmlcov/ public/
42
    - mv /builds/Monash/tupak/coverage_badge.svg public/
Gregory Ashton's avatar
Gregory Ashton committed
43 44 45 46 47 48
  artifacts:
    paths:
      - public
    expire_in: 30 days
  #only:
    #- master