Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.72 KiB
Newer Older
Gregory Ashton's avatar
Gregory Ashton committed
# 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:
    - pip install -r requirements.txt
Gregory Ashton's avatar
Gregory Ashton committed
    - pip install coverage
    - pip install coverage-badge
    - python setup.py install
    - coverage run --include=tupak/* -a test/detector_tests.py
    - coverage run --include=tupak/* -a test/prior_tests.py
    - coverage run --include=tupak/* -a test/sampler_tests.py
    - coverage run --include=tupak/* -a test/waveform_generator_tests.py
    - coverage html
    - coverage-badge -o coverage_badge.svg -f
    - coverage run --omit=* -a test/example_tests.py
    - coverage run --omit=* -a test/noise_realisation_tests.py
    - coverage run --omit=* -a test/tests.py

    # Make the documentation
    - pip install -r docs/requirements.txt
    - cd docs
    - make clean
Gregory Ashton's avatar
Gregory Ashton committed
  artifacts:
    paths:
      - htmlcov/
      - coverage_badge.svg
      - docs/_build/html/
Gregory Ashton's avatar
Gregory Ashton committed

pages:
  stage: deploy
  dependencies:
    - exitcode-jessie
  script:
    - mkdir public/
Gregory Ashton's avatar
Gregory Ashton committed
    - mv htmlcov/ public/
    - mv /builds/Monash/tupak/coverage_badge.svg public/
    - mv docs/_build/html/* public/
Gregory Ashton's avatar
Gregory Ashton committed
  artifacts:
    paths:
      - public
    expire_in: 30 days
  #only:
    #- master