.gitlab-ci.yml 1.62 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
    - python setup.py install
25
    - coverage erase
26
    - coverage run --include=tupak/* -a test/prior_tests.py
27 28 29 30
      #- coverage run --include=tupak/* -a test/tests.py
      #- coverage run --include=tupak/* -a test/waveform_generator_tests.py
      #- coverage run --include=tupak/* -a test/noise_realisation_tests.py
      #- coverage run --include=tupak/* -a test/example_tests.py
31
    - coverage html
32
    - coverage-badge -o coverage_badge.svg -f
33 34 35 36 37 38

    # Make the documentation
    - pip install -r docs/requirements.txt
    - cd docs
    - make html

Gregory Ashton's avatar
Gregory Ashton committed
39 40 41
  artifacts:
    paths:
      - htmlcov/
42
      - coverage_badge.svg
43
      - docs/_build/html/
Gregory Ashton's avatar
Gregory Ashton committed
44 45 46 47 48 49

pages:
  stage: deploy
  dependencies:
    - exitcode-jessie
  script:
50
    - mkdir public/
Gregory Ashton's avatar
Gregory Ashton committed
51
    - mv htmlcov/ public/
52
    - mv /builds/Monash/tupak/coverage_badge.svg public/
53
    - mv docs/_build/html/* public/
Gregory Ashton's avatar
Gregory Ashton committed
54 55 56 57 58 59
  artifacts:
    paths:
      - public
    expire_in: 30 days
  #only:
    #- master